summaryrefslogtreecommitdiffstats
path: root/js/src/tests/js1_5/Regress
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-10-27 02:14:16 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-10-27 02:14:16 +0100
commit24027f0df9d23304709a80c22c6bfdbd27a95046 (patch)
treef3bbd19d50d8433df73a2691a22239912169405e /js/src/tests/js1_5/Regress
parent44a077980abb92dcea9ed374fd9719eaaf2f1458 (diff)
downloadUXP-24027f0df9d23304709a80c22c6bfdbd27a95046.tar
UXP-24027f0df9d23304709a80c22c6bfdbd27a95046.tar.gz
UXP-24027f0df9d23304709a80c22c6bfdbd27a95046.tar.lz
UXP-24027f0df9d23304709a80c22c6bfdbd27a95046.tar.xz
UXP-24027f0df9d23304709a80c22c6bfdbd27a95046.zip
Issue #1257 - Part 3: Remove/update tests.
This removes a ton of tests that are no longer relevant with (un)watch removed (e.g. testing stability/bugs in the watchpoint system itself which has never been the most stable), and updates others that would previously rely on watch/unwatch, so that they don't unexpectedly fail.
Diffstat (limited to 'js/src/tests/js1_5/Regress')
-rw-r--r--js/src/tests/js1_5/Regress/regress-127243.js75
-rw-r--r--js/src/tests/js1_5/Regress/regress-213482.js29
-rw-r--r--js/src/tests/js1_5/Regress/regress-240577.js37
-rw-r--r--js/src/tests/js1_5/Regress/regress-355341.js29
-rw-r--r--js/src/tests/js1_5/Regress/regress-355344.js49
-rw-r--r--js/src/tests/js1_5/Regress/regress-361467.js32
-rw-r--r--js/src/tests/js1_5/Regress/regress-361617.js35
-rw-r--r--js/src/tests/js1_5/Regress/regress-385393-06.js28
-rw-r--r--js/src/tests/js1_5/Regress/regress-506567.js45
9 files changed, 0 insertions, 359 deletions
diff --git a/js/src/tests/js1_5/Regress/regress-127243.js b/js/src/tests/js1_5/Regress/regress-127243.js
deleted file mode 100644
index 11779f803..000000000
--- a/js/src/tests/js1_5/Regress/regress-127243.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// |reftest| skip-if(xulRuntime.OS=="WINNT"&&isDebugBuild) slow
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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 = 127243;
-var summary = 'Do not crash on watch';
-var actual = 'No Crash';
-var expect = 'No Crash';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
-
-if (typeof window != 'undefined' && typeof document != 'undefined')
-{
- // delay test driver end
- gDelayTestDriverEnd = true;
- window.addEventListener('load', handleLoad, false);
-}
-else
-{
- printStatus('This test must be run in the browser');
- reportCompare(expect, actual, summary);
-
-}
-
-var div;
-
-function handleLoad()
-{
- div = document.createElement('div');
- document.body.appendChild(div);
- div.setAttribute('id', 'id1');
- div.style.width = '50px';
- div.style.height = '100px';
- div.style.overflow = 'auto';
-
- for (var i = 0; i < 5; i++)
- {
- var p = document.createElement('p');
- var t = document.createTextNode('blah');
- p.appendChild(t);
- div.appendChild(p);
- }
-
- div.watch('scrollTop', wee);
-
- setTimeout('setScrollTop()', 1000);
-}
-
-function wee(id, oldval, newval)
-{
- var t = document.createTextNode('setting ' + id +
- ' value ' + div.scrollTop +
- ' oldval ' + oldval +
- ' newval ' + newval);
- var p = document.createElement('p');
- p.appendChild(t);
- document.body.appendChild(p);
-
- return newval;
-}
-
-function setScrollTop()
-{
- div.scrollTop = 42;
-
- reportCompare(expect, actual, summary);
-
- gDelayTestDriverEnd = false;
- jsTestDriverEnd();
-
-}
diff --git a/js/src/tests/js1_5/Regress/regress-213482.js b/js/src/tests/js1_5/Regress/regress-213482.js
deleted file mode 100644
index 26ed7e894..000000000
--- a/js/src/tests/js1_5/Regress/regress-213482.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- 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 = 213482;
-var summary = 'Do not crash watching property when watcher sets property';
-var actual = 'No Crash';
-var expect = 'No Crash';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
-
-var testobj = {value: 'foo'};
-
-function watched (a, b, c) {
- testobj.value = (new Date()).getTime();
-}
-
-function setTest() {
- testobj.value = 'b';
-}
-
-testobj.watch("value", watched);
-
-setTest();
-
-reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_5/Regress/regress-240577.js b/js/src/tests/js1_5/Regress/regress-240577.js
deleted file mode 100644
index ba8330aa0..000000000
--- a/js/src/tests/js1_5/Regress/regress-240577.js
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/*
- * Any copyright is dedicated to the Public Domain.
- * http://creativecommons.org/licenses/publicdomain/
- * Contributor: Bob Clary
- */
-
-//-----------------------------------------------------------------------------
-// originally reported by Jens Thiele <karme@unforgettable.com> in
-var BUGNUMBER = 240577;
-var summary = 'object.watch execution context';
-var actual = '';
-var expect = '';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
-
-var createWatcher = function ( watchlabel )
-{
- var watcher = function (property, oldvalue, newvalue)
- {
- actual += watchlabel; return newvalue;
- };
- return watcher;
-};
-
-var watcher1 = createWatcher('watcher1');
-
-var object = {property: 'value'};
-
-object.watch('property', watcher1);
-
-object.property = 'newvalue';
-
-expect = 'watcher1';
-
-reportCompare(expect, actual, summary);
diff --git a/js/src/tests/js1_5/Regress/regress-355341.js b/js/src/tests/js1_5/Regress/regress-355341.js
deleted file mode 100644
index ab2a4b884..000000000
--- a/js/src/tests/js1_5/Regress/regress-355341.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- 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 = 355341;
-var summary = 'Do not crash with watch and setter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
- enterFunc ('test');
- printBugNumber(BUGNUMBER);
- printStatus (summary);
-
- Object.defineProperty(this, "x", { set: Function, enumerable: true, configurable: true });
- this.watch('x', function () { }); x = 3;
-
- reportCompare(expect, actual, summary);
-
- exitFunc ('test');
-}
diff --git a/js/src/tests/js1_5/Regress/regress-355344.js b/js/src/tests/js1_5/Regress/regress-355344.js
deleted file mode 100644
index 00bd39147..000000000
--- a/js/src/tests/js1_5/Regress/regress-355344.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- 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 = 355344;
-var summary = 'Exceptions thrown by watch point';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
- enterFunc ('test');
- printBugNumber(BUGNUMBER);
- printStatus (summary);
-
- var o = {};
-
- expect = 'setter: yikes';
-
- o.watch('x', function(){throw 'yikes'});
- try
- {
- o.x = 3;
- }
- catch(ex)
- {
- actual = "setter: " + ex;
- }
-
- try
- {
- eval("") ;
- }
- catch(e)
- {
- actual = "eval: " + e;
- }
-
- reportCompare(expect, actual, summary);
-
- exitFunc ('test');
-}
diff --git a/js/src/tests/js1_5/Regress/regress-361467.js b/js/src/tests/js1_5/Regress/regress-361467.js
deleted file mode 100644
index 371c0a8b5..000000000
--- a/js/src/tests/js1_5/Regress/regress-361467.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- 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 = 361467;
-var summary = 'Do not crash with certain watchers';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
- enterFunc ('test');
- printBugNumber(BUGNUMBER);
- printStatus (summary);
-
- expect = actual = 'No Crash';
-
- var x;
- this.watch('x', print);
- x = 5;
-
- reportCompare(expect, actual, summary);
-
- exitFunc ('test');
-}
diff --git a/js/src/tests/js1_5/Regress/regress-361617.js b/js/src/tests/js1_5/Regress/regress-361617.js
deleted file mode 100644
index 5d20fd78f..000000000
--- a/js/src/tests/js1_5/Regress/regress-361617.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- 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 = 361617;
-var summary = 'Do not crash with getter, watch and gc';
-var actual = 'No Crash';
-var expect = 'No Crash';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
- enterFunc ('test');
- printBugNumber(BUGNUMBER);
- printStatus (summary);
-
- (function() {
- Object.defineProperty(this, "x", { get: function(){}, enumerable: true, configurable: true });
- })();
- this.watch('x', print);
- Object.defineProperty(this, "x", { get: function(){}, enumerable: true, configurable: true });
- gc();
- this.unwatch('x');
- x;
-
- reportCompare(expect, actual, summary);
-
- exitFunc ('test');
-}
diff --git a/js/src/tests/js1_5/Regress/regress-385393-06.js b/js/src/tests/js1_5/Regress/regress-385393-06.js
deleted file mode 100644
index 327103f39..000000000
--- a/js/src/tests/js1_5/Regress/regress-385393-06.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- 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);
-
- reportCompare(expect, actual, summary);
-
- true.watch("x", function(){});
-
- exitFunc ('test');
-}
diff --git a/js/src/tests/js1_5/Regress/regress-506567.js b/js/src/tests/js1_5/Regress/regress-506567.js
deleted file mode 100644
index e78dfe1db..000000000
--- a/js/src/tests/js1_5/Regress/regress-506567.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- 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 = 506567;
-var summary = 'Do not crash with watched variables';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
- enterFunc ('test');
- printBugNumber(BUGNUMBER);
- printStatus (summary);
-
- if (typeof clearInterval == 'undefined')
- {
- clearInterval = (function () {});
- }
-
- var obj = new Object();
- obj.test = null;
- obj.watch("test", (function(prop, oldval, newval)
- {
- if(false)
- {
- var test = newval % oldval;
- var func = (function(){clearInterval(myInterval);});
- }
- }));
-
- obj.test = 'null';
- print(obj.test);
-
- reportCompare(expect, actual, summary);
-
- exitFunc ('test');
-}