Fix up the tests from bug 555246 to run when there's no evalcx function available.
authorRobert Sayre <sayrer@gmail.com>
Sun, 04 Apr 2010 09:41:11 -0400
changeset 40453 157e043e33765abb8d4864bd081e4239bf3ea5eb
parent 40452 e4364736e170e88788578cf963d563d137d2d54f
child 40454 954e0f3185f7ecab2b2b5fae29085a01c5189ae3
push id12610
push userrsayre@mozilla.com
push dateMon, 05 Apr 2010 17:26:41 +0000
treeherdermozilla-central@1942c0b4e101 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs555246
milestone1.9.3a4pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Fix up the tests from bug 555246 to run when there's no evalcx function available.
js/src/tests/js1_8_5/regress/regress-555246-0.js
js/src/tests/js1_8_5/regress/regress-555246-1.js
--- a/js/src/tests/js1_8_5/regress/regress-555246-0.js
+++ b/js/src/tests/js1_8_5/regress/regress-555246-0.js
@@ -1,11 +1,14 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  * 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, "");
--- a/js/src/tests/js1_8_5/regress/regress-555246-1.js
+++ b/js/src/tests/js1_8_5/regress/regress-555246-1.js
@@ -1,11 +1,12 @@
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  * Contributor: Jason Orendorff
  */
 
+assertEq(typeof evalcx, "function", "")
 var cx = evalcx("");
 evalcx("function f() { return this; }", cx);
 f = cx.f;
 assertEq(f(), cx);
 reportCompare(0, 0, "");