Fix up the tests from bug 555246 to pass in the browser.

--HG--
extra : rebase_source : 7402ef86dc51523e55013345eba02a2e95122478
This commit is contained in:
Jason Orendorff 2010-06-03 23:33:40 -07:00
parent c3f36f58a1
commit fc6b177f0b
3 changed files with 12 additions and 10 deletions

View File

@ -12,7 +12,7 @@ script regress-551763-0.js
script regress-551763-1.js
script regress-551763-2.js
script regress-555246-0.js
fails script regress-555246-1.js
script regress-555246-1.js
script regress-559438.js
script regress-560101.js
script regress-560998-1.js

View File

@ -5,10 +5,10 @@
*/
if (typeof evalcx == 'function') {
var cx = evalcx("");
evalcx("function f() { return this; }", cx);
var f = cx.f;
assertEq(f(), cx);
var cx = evalcx("");
evalcx("function f() { return this; }", cx);
var f = cx.f;
assertEq(f(), cx);
}
reportCompare(0, 0, "");

View File

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