diff options
Diffstat (limited to 'js/src/tests/ecma_3/Regress')
-rw-r--r-- | js/src/tests/ecma_3/Regress/browser.js | 0 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-385393-04.js | 33 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-419152.js | 57 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-420087.js | 31 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-420610.js | 17 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-441477-01.js | 42 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-469937.js | 27 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/regress-580544.js | 30 | ||||
-rw-r--r-- | js/src/tests/ecma_3/Regress/shell.js | 0 |
9 files changed, 237 insertions, 0 deletions
diff --git a/js/src/tests/ecma_3/Regress/browser.js b/js/src/tests/ecma_3/Regress/browser.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/ecma_3/Regress/browser.js diff --git a/js/src/tests/ecma_3/Regress/regress-385393-04.js b/js/src/tests/ecma_3/Regress/regress-385393-04.js new file mode 100644 index 000000000..bee6ec7e2 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-385393-04.js @@ -0,0 +1,33 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 385393; +var summary = 'Regression test for bug 385393'; +var actual = 'No Crash'; +var expect = 'No Crash'; + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + try + { + 'a'.replace(/a/g, eval); + } + catch(ex) + { + } + + reportCompare(expect, actual, summary); + + exitFunc ('test'); +} diff --git a/js/src/tests/ecma_3/Regress/regress-419152.js b/js/src/tests/ecma_3/Regress/regress-419152.js new file mode 100644 index 000000000..b8823d027 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-419152.js @@ -0,0 +1,57 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 419152; +var summary = 'Shaver can not contain himself'; +var actual = ''; +var expect = ''; + + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + var a = [1,2,3]; + + a[5] = 6; + expect = '1,2,3,,,6:6'; + actual = a + ':' + a.length; + reportCompare(expect, actual, summary + ': 1'); + + a = [1,2,3,4]; + expect = 'undefined'; + actual = a[-1] + ''; + reportCompare(expect, actual, summary + ': 2'); + + a = [1,2,3]; + a[-1] = 55; + + expect = 3; + actual = a.length; + reportCompare(expect, actual, summary + ': 3'); + + expect = '1,2,3'; + actual = a + ''; + reportCompare(expect, actual, summary + ': 4'); + + expect = 55; + actual = a[-1]; + reportCompare(expect, actual, summary + ': 5'); + + var s = "abcdef"; + + expect = 'undefined'; + actual = s[-2] + ''; + reportCompare(expect, actual, summary + ': 6'); + + exitFunc ('test'); +} diff --git a/js/src/tests/ecma_3/Regress/regress-420087.js b/js/src/tests/ecma_3/Regress/regress-420087.js new file mode 100644 index 000000000..c4730a9e0 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-420087.js @@ -0,0 +1,31 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 420087; +var summary = 'Do not assert: PCVCAP_MAKE(sprop->shape, 0, 0) == entry->vcap'; +var actual = 'No Crash'; +var expect = 'No Crash'; + + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + var dict; + + for (var i = 0; i < 2; i++) + dict = {p: 1, q: 1, p:1}; + + reportCompare(expect, actual, summary); + + exitFunc ('test'); +} diff --git a/js/src/tests/ecma_3/Regress/regress-420610.js b/js/src/tests/ecma_3/Regress/regress-420610.js new file mode 100644 index 000000000..a74d21655 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-420610.js @@ -0,0 +1,17 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 420610; +var summary = 'Do not crash with eval("this.x")'; +var actual = 'No Crash'; +var expect = 'No Crash'; + +printBugNumber(BUGNUMBER); +printStatus (summary); + +(function(){ eval("this.x") })(); + +reportCompare(expect, actual, summary); diff --git a/js/src/tests/ecma_3/Regress/regress-441477-01.js b/js/src/tests/ecma_3/Regress/regress-441477-01.js new file mode 100644 index 000000000..101abdbda --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-441477-01.js @@ -0,0 +1,42 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + * Contributor: Jason Orendorff + */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 441477-01; +var summary = ''; +var actual = 'No Exception'; +var expect = 'No Exception'; + + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + try + { + for (i = 0; i < 5;) + { + if (i > 5) + throw "bad"; + i++; + continue; + } + } + catch(ex) + { + actual = ex + ''; + } + reportCompare(expect, actual, summary); + + exitFunc ('test'); +} diff --git a/js/src/tests/ecma_3/Regress/regress-469937.js b/js/src/tests/ecma_3/Regress/regress-469937.js new file mode 100644 index 000000000..753735c15 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-469937.js @@ -0,0 +1,27 @@ +/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 469937; +var summary = 'Properties without DontEnum are sometimes not enumerated'; +var actual = false; +var expect = true; + +printBugNumber(BUGNUMBER); +printStatus (summary); + +(function(){ + var o = { } + o.PageLeft = 1; + o.Rect2 = 6; + delete o.Rect2; + for (var p in o); + o.Rect3 = 7; + found = false; + for (var p in o) if (p == 'Rect3') found = true; + actual = found; +})(); + +reportCompare(expect, actual, summary); diff --git a/js/src/tests/ecma_3/Regress/regress-580544.js b/js/src/tests/ecma_3/Regress/regress-580544.js new file mode 100644 index 000000000..4e0ca92f8 --- /dev/null +++ b/js/src/tests/ecma_3/Regress/regress-580544.js @@ -0,0 +1,30 @@ +// Any copyright is dedicated to the Public Domain. +// http://creativecommons.org/licenses/publicdomain/ + +var gTestfile = 'regress-580544.js'; +//----------------------------------------------------------------------------- +var BUGNUMBER = 580544; +var summary = 'Do not assert: new (this.prototype = this)'; +var actual = 'No Crash'; +var expect = 'No Crash'; + + +//----------------------------------------------------------------------------- +test(); +//----------------------------------------------------------------------------- + +function test() +{ + enterFunc ('test'); + printBugNumber(BUGNUMBER); + printStatus (summary); + + try { + new (this.prototype = this); + } catch (e) { + } + + reportCompare(expect, actual, summary); + + exitFunc ('test'); +} diff --git a/js/src/tests/ecma_3/Regress/shell.js b/js/src/tests/ecma_3/Regress/shell.js new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/js/src/tests/ecma_3/Regress/shell.js |