diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:41 -0800 |
commit | 648161bb0edfc3d43db63caed5cc5213bc6cb78f (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /JavaScriptCore/tests/mozilla/js1_3/regress | |
parent | a65af38181ac7d34544586bdb5cd004de93897ad (diff) | |
download | external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.zip external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.gz external_webkit-648161bb0edfc3d43db63caed5cc5213bc6cb78f.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'JavaScriptCore/tests/mozilla/js1_3/regress')
6 files changed, 0 insertions, 494 deletions
diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/delete-001.js b/JavaScriptCore/tests/mozilla/js1_3/regress/delete-001.js deleted file mode 100644 index e2f4332..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/delete-001.js +++ /dev/null @@ -1,79 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - File Name: delete-001.js - Section: regress - Description: - - Regression test for - http://scopus.mcom.com/bugsplat/show_bug.cgi?id=108736 - - Author: christine@netscape.com - Date: 12 november 1997 -*/ - - var SECTION = "JS1_2"; - var VERSION = "JS1_2"; - var TITLE = "The variable statment"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - // delete all properties of the global object - // per ecma, this does not affect variables in the global object declared - // with var or functions - - for ( p in this ) { - delete p; - } - - var result =""; - - for ( p in this ) { - result += String( p ); - } - - // not too picky here... just want to make sure we didn't crash or something - - testcases[testcases.length] = new TestCase( SECTION, - "delete all properties of the global object", - "PASSED", - result == "" ? "FAILED" : "PASSED" ); - - - test(); - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/function-001-n.js b/JavaScriptCore/tests/mozilla/js1_3/regress/function-001-n.js deleted file mode 100644 index 5b4add0..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/function-001-n.js +++ /dev/null @@ -1,74 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - * File Name: boolean-001.js - * Description: - * - * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=99232 - * - * eval("function f(){}function g(){}") at top level is an error for JS1.2 - * and above (missing ; between named function expressions), but declares f - * and g as functions below 1.2. - * - * Fails to produce error regardless of version: - * js> version(100) - * 120 - * js> eval("function f(){}function g(){}") - * js> version(120); - * 100 - * js> eval("function f(){}function g(){}") - * js> - * Author: christine@netscape.com - * Date: 11 August 1998 - */ - var SECTION = "function-001.js"; - var VERSION = "JS_1.3"; - var TITLE = "functions not separated by semicolons are errors in version 120 and higher"; - var BUGNUMBER="10278"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - testcases[tc++] = new TestCase( - SECTION, - "eval(\"function f(){}function g(){}\")", - "error", - eval("function f(){}function g(){}") ); - - test(); - - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/function-002.js b/JavaScriptCore/tests/mozilla/js1_3/regress/function-002.js deleted file mode 100644 index d3d1d85..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/function-002.js +++ /dev/null @@ -1,75 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - File Name: function-002.js - Section: - Description: - - http://scopus.mcom.com/bugsplat/show_bug.cgi?id=249579 - - function definitions in conditional statements should be allowed. - - Author: christine@netscape.com - Date: 12 november 1997 -*/ - var SECTION = "function-002"; - var VERSION = "JS1_3"; - var TITLE = "Regression test for 249579"; - var BUGNUMBER="249579"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - testcases[tc++] = new TestCase( - SECTION, - "0?function(){}:0", - 0, - 0?function(){}:0 ); - - - bar = true; - foo = bar ? function () { return true; } : function() { return false; }; - - testcases[tc++] = new TestCase( - SECTION, - "bar = true; foo = bar ? function () { return true; } : function() { return false; }; foo()", - true, - foo() ); - - - test(); - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/in-001.js b/JavaScriptCore/tests/mozilla/js1_3/regress/in-001.js deleted file mode 100644 index f524870..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/in-001.js +++ /dev/null @@ -1,66 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - File Name: in-001.js - Section: - Description: - - http://scopus.mcom.com/bugsplat/show_bug.cgi?id=196109 - - - Author: christine@netscape.com - Date: 12 november 1997 -*/ - var SECTION = "in-001"; - var VERSION = "JS1_3"; - var TITLE = "Regression test for 196109"; - var BUGNUMBER="196109"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - o = {}; - o.foo = 'sil'; - - testcases[tc++] = new TestCase( - SECTION, - "\"foo\" in o", - true, - "foo" in o ); - - test(); - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/new-001.js b/JavaScriptCore/tests/mozilla/js1_3/regress/new-001.js deleted file mode 100644 index 2868eca..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/new-001.js +++ /dev/null @@ -1,120 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - File Name: new-001.js - Section: - Description: - - http://scopus.mcom.com/bugsplat/show_bug.cgi?id=76103 - - Author: christine@netscape.com - Date: 12 november 1997 -*/ - var SECTION = "new-001"; - var VERSION = "JS1_3"; - var TITLE = "new-001"; - var BUGNUMBER="31567"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - function Test_One (x) { - this.v = x+1; - return x*2 - } - - function Test_Two( x, y ) { - this.v = x; - return y; - } - - testcases[tc++] = new TestCase( - SECTION, - "Test_One(18)", - 36, - Test_One(18) ); - - testcases[tc++] = new TestCase( - SECTION, - "new Test_One(18)", - "[object Object]", - new Test_One(18) +"" ); - - testcases[tc++] = new TestCase( - SECTION, - "new Test_One(18).v", - 19, - new Test_One(18).v ); - - testcases[tc++] = new TestCase( - SECTION, - "Test_Two(2,7)", - 7, - Test_Two(2,7) ); - - testcases[tc++] = new TestCase( - SECTION, - "new Test_Two(2,7)", - "[object Object]", - new Test_Two(2,7) +"" ); - - testcases[tc++] = new TestCase( - SECTION, - "new Test_Two(2,7).v", - 2, - new Test_Two(2,7).v ); - - testcases[tc++] = new TestCase( - SECTION, - "new (Function)(\"x\", \"return x+3\")(5,6)", - 8, - new (Function)("x","return x+3")(5,6) ); - - testcases[tc++] = new TestCase( - SECTION, - "new new Test_Two(String, 2).v(0123)", - "83", - new new Test_Two(String, 2).v(0123) +""); - - testcases[tc++] = new TestCase( - SECTION, - "new new Test_Two(String, 2).v(0123).length", - 2, - new new Test_Two(String, 2).v(0123).length ); - - test(); - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} diff --git a/JavaScriptCore/tests/mozilla/js1_3/regress/switch-001.js b/JavaScriptCore/tests/mozilla/js1_3/regress/switch-001.js deleted file mode 100644 index 47d8a44..0000000 --- a/JavaScriptCore/tests/mozilla/js1_3/regress/switch-001.js +++ /dev/null @@ -1,80 +0,0 @@ -/* The contents of this file are subject to the Netscape Public - * License Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. - * - * The Original Code is Mozilla Communicator client code, released March - * 31, 1998. - * - * The Initial Developer of the Original Code is Netscape Communications - * Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All - * Rights Reserved. - * - * Contributor(s): - * - */ -/** - File Name: switch-001.js - Section: - Description: - - http://scopus.mcom.com/bugsplat/show_bug.cgi?id=315767 - - Verify that switches do not use strict equality in - versions of JavaScript < 1.4. It's now been decided that - we won't put in version switches, so all switches will - be ECMA. - - Author: christine@netscape.com - Date: 12 november 1997 -*/ - var SECTION = "switch-001"; - var VERSION = "JS1_3"; - var TITLE = "switch-001"; - var BUGNUMBER="315767"; - - startTest(); - writeHeaderToLog( SECTION + " "+ TITLE); - - var testcases = new Array(); - - result = "fail: did not enter switch"; - - switch (true) { - case 1: - result = "fail: version 130 should force strict equality"; - break; - case true: - result = "pass"; - break; - default: - result = "fail: evaluated default statement"; - } - - testcases[tc++] = new TestCase( - SECTION, - "switch / case should use strict equality in version of JS < 1.4", - "pass", - result ); - - test(); - -function test() { - for ( tc=0; tc < testcases.length; tc++ ) { - testcases[tc].passed = writeTestCaseResult( - testcases[tc].expect, - testcases[tc].actual, - testcases[tc].description +" = "+ - testcases[tc].actual ); - - testcases[tc].reason += ( testcases[tc].passed ) ? "" : "wrong value "; - } - stopTest(); - return ( testcases ); -} |