Fix up the tests from bug 555246 to run when there's no evalcx function available.

This commit is contained in:
Robert Sayre 2010-04-04 09:41:11 -04:00
parent d447d924df
commit c95c882b76
2 changed files with 8 additions and 4 deletions

View File

@ -4,8 +4,11 @@
* Contributor: Jason Orendorff
*/
var cx = evalcx("");
evalcx("function f() { return this; }", cx);
var f = cx.f;
assertEq(f(), cx);
if (typeof evalcx != 'function') {
var cx = evalcx("");
evalcx("function f() { return this; }", cx);
var f = cx.f;
assertEq(f(), cx);
}
reportCompare(0, 0, "");

View File

@ -4,6 +4,7 @@
* Contributor: Jason Orendorff
*/
assertEq(typeof evalcx, "function", "")
var cx = evalcx("");
evalcx("function f() { return this; }", cx);
f = cx.f;