Bug 552560 - Test fixups/removals since parent() exists only in the shell, not the browser. r=mrbkap

This commit is contained in:
Jeff Walden 2010-05-04 15:59:20 -07:00
parent 62bf5ca9d8
commit 2eb97e810d
6 changed files with 15 additions and 233 deletions

View File

@ -13,7 +13,6 @@ script regress-104077.js
script regress-164697.js
script regress-178722.js
script regress-192465.js
script regress-220584.js
script regress-225831.js
script regress-226078.js
script regress-226507.js
@ -32,7 +31,6 @@ script regress-311161.js
script regress-311583.js
script regress-311792-01.js
script regress-311792-02.js
script regress-312278.js
script regress-313500.js
script regress-313763.js
script regress-313803.js
@ -196,7 +194,6 @@ script regress-452168.js
script regress-452178.js
script regress-452329.js
script regress-452338.js
script regress-452372.js
script regress-452565.js
script regress-453249.js
script regress-454040.js

View File

@ -79,20 +79,23 @@ function runtest(myinstance, myconstructor)
var expr;
var actual;
try
if (typeof parent === "function")
{
expr =
'parent(' + myinstance + ') == ' +
'parent(' + myconstructor + ')';
printStatus(expr);
actual = eval(expr).toString();
}
catch(ex)
{
actual = ex + '';
}
try
{
expr =
'parent(' + myinstance + ') == ' +
'parent(' + myconstructor + ')';
printStatus(expr);
actual = eval(expr).toString();
}
catch(ex)
{
actual = ex + '';
}
reportCompare(expect, actual, expr);
reportCompare(expect, actual, expr);
}
try
{

View File

@ -1,75 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2005
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Igor Bukanov
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gTestfile = 'regress-312278.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 312278;
var summary = 'Do not access GC-ed object in Error.prototype.toSource';
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
printStatus (summary);
function wrapInsideWith(obj)
{
var f;
with (obj) {
f = function() { }
}
return parent(f);
}
function customToSource()
{
return "customToSource "+this;
}
Error.prototype.__defineGetter__('message', function() {
var obj = {
toSource: "something"
}
obj.__defineGetter__('toSource', function() {
gc();
return customToSource;
});
return wrapInsideWith(obj);
});
printStatus(Error.prototype.toSource());
reportCompare(expect, actual, summary);

View File

@ -1,64 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): Jesse Ruderman
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gTestfile = 'regress-452372.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 452372;
var summary = 'Do not assert with JIT: entry->kpc == (jsbytecode*) atom';
var actual = 'No Crash';
var expect = 'No Crash';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
enterFunc ('test');
printBugNumber(BUGNUMBER);
printStatus (summary);
jit(true);
eval("(function() { for (var j = 0; j < 4; ++j) { parent(/x/); } })")();
jit(false);
reportCompare(expect, actual, summary);
exitFunc ('test');
}

View File

@ -32,7 +32,6 @@ script regress-355052-03.js
script regress-355145.js
script regress-355410.js
script regress-355512.js
script regress-355578.js
script regress-355583.js
script regress-363040-01.js
script regress-363040-02.js

View File

@ -1,78 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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 JavaScript Engine testing utilities.
*
* The Initial Developer of the Original Code is
* Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): shutdown
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gTestfile = 'regress-355578.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 355578;
var summary = 'block object access to dead JSStackFrame';
var actual = '';
var expect = '';
//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------
function test()
{
enterFunc ('test');
printBugNumber(BUGNUMBER);
printStatus (summary);
var filler = "", rooter = {};
for(var i = 0; i < 0x70/2; i++)
{
filler += "\u5050";
}
var blkobj = function() { let x; yield parent(function(){}); }().next();
gc();
for(var i = 0; i < 1024; i++)
{
rooter[i] = filler + i;
}
try
{
print(blkobj.x);
}
catch(ex)
{
}
reportCompare(expect, actual, summary);
exitFunc ('test');
}