diff --git a/mozilla/js/tests/e4x/Global/13.1.2.1.js b/mozilla/js/tests/e4x/Global/13.1.2.1.js
index bb7e06fbc8c..493b7fbc576 100644
--- a/mozilla/js/tests/e4x/Global/13.1.2.1.js
+++ b/mozilla/js/tests/e4x/Global/13.1.2.1.js
@@ -468,7 +468,7 @@ function init()
function testIsXMLName(buffer)
{
- var nl = NL();
+ var nl = "\n";
var result = '';
var length = buffer.length;
diff --git a/mozilla/js/tests/e4x/TypeConversion/10.4.1.js b/mozilla/js/tests/e4x/TypeConversion/10.4.1.js
index e954a57b625..3ce2042231a 100644
--- a/mozilla/js/tests/e4x/TypeConversion/10.4.1.js
+++ b/mozilla/js/tests/e4x/TypeConversion/10.4.1.js
@@ -51,7 +51,7 @@ x =
>;
TEST(1, "xml", typeof(x));
-TEST(2, "one" + NL() + "two", x.toXMLString());
+TEST(2, "one\ntwo", x.toXMLString());
// Load from another XMLList
// Make sure it is copied if it's an XMLList
@@ -59,7 +59,7 @@ y = new XMLList(x);
x += three;
-TEST(3, "one" + NL() + "two", y.toXMLString());
+TEST(3, "one\ntwo", y.toXMLString());
// Load from one XML type
x = new XMLList(one);
@@ -67,11 +67,11 @@ TEST(4, "one", x.toXMLString());
// Load from Anonymous
x = new XMLList(<>onetwo>);
-TEST(5, "one" + NL() + "two", x.toXMLString());
+TEST(5, "one\ntwo", x.toXMLString());
// Load from Anonymous as string
x = new XMLList("onetwo");
-TEST(6, "one" + NL() + "two", x.toXMLString());
+TEST(6, "one\ntwo", x.toXMLString());
// Load from illegal type
//x = new XMLList("foobar");
diff --git a/mozilla/js/tests/e4x/TypeConversion/10.4.js b/mozilla/js/tests/e4x/TypeConversion/10.4.js
index fa92e27566c..ba509228c0d 100644
--- a/mozilla/js/tests/e4x/TypeConversion/10.4.js
+++ b/mozilla/js/tests/e4x/TypeConversion/10.4.js
@@ -62,7 +62,7 @@ x = new String("one");
TEST(3, one, new XMLList(x));
x = new String("onetwo");
-TEST(4, "one" + NL() + "two",
+TEST(4, "one\ntwo",
new XMLList(x).toXMLString());
// XML
@@ -77,7 +77,7 @@ x = new XMLList(one);
TEST(7, one, new XMLList(x));
x = new XMLList(<>onetwo>);
-TEST(8, "one" + NL() + "two",
+TEST(8, "one\ntwo",
new XMLList(x).toXMLString());
END();
\ No newline at end of file
diff --git a/mozilla/js/tests/e4x/Types/9.2.1.2.js b/mozilla/js/tests/e4x/Types/9.2.1.2.js
index b27f862c043..1b9185f02b7 100644
--- a/mozilla/js/tests/e4x/Types/9.2.1.2.js
+++ b/mozilla/js/tests/e4x/Types/9.2.1.2.js
@@ -48,15 +48,15 @@ var x =
two
>;
-TEST(1, "one" + NL() + "two",
+TEST(1, "one\ntwo",
x.toXMLString());
x[0] = three;
-TEST(2, "three" + NL() + "two",
+TEST(2, "three\ntwo",
x.toXMLString());
x[0] = four + five;
-TEST(3, "four" + NL() + "five" + NL() + "two",
+TEST(3, "four\nfive\ntwo",
x.toXMLString());
END();
\ No newline at end of file
diff --git a/mozilla/js/tests/e4x/XML/13.4.3.js b/mozilla/js/tests/e4x/XML/13.4.3.js
index e67e5cad0e1..cd756d16929 100644
--- a/mozilla/js/tests/e4x/XML/13.4.3.js
+++ b/mozilla/js/tests/e4x/XML/13.4.3.js
@@ -61,9 +61,9 @@ XML.ignoreComments = false;
x = one;
correct =
-"" + NL() +
-" " + NL() +
-" one" + NL() +
+"\n" +
+" \n" +
+" one\n" +
"";
TEST_XML(7, correct, x);
@@ -97,9 +97,9 @@ x =
>;
correct =
-"" + NL() +
-" " + NL() +
-" one" + NL() +
+"\n" +
+" \n" +
+" one\n" +
"";
TEST_XML(9, correct, x);
@@ -109,8 +109,8 @@ XML.setSettings();
x = new XML(" \t\r\n\r\n \t\r\n\r\none \t\r\n\r\n");
correct =
-"" + NL() +
-" one" + NL() +
+"\n" +
+" one\n" +
"";
TEST_XML(10, correct, x);
@@ -137,14 +137,14 @@ x =
;
-correct = "" + NL() +
- " one" + NL() +
- " two" + NL() +
- " " + NL() +
- " " + NL() +
- " three" + NL() +
- " four" + NL() +
- " " + NL() +
+correct = "\n" +
+ " one\n" +
+ " two\n" +
+ " \n" +
+ " \n" +
+ " three\n" +
+ " four\n" +
+ " \n" +
"";
TEST(12, correct, x.toString());
@@ -160,14 +160,14 @@ TEST(15, correct, x.toXMLString());
XML.prettyPrinting = true;
XML.prettyIndent = 3;
-correct = "" + NL() +
- " one" + NL() +
- " two" + NL() +
- " " + NL() +
- " " + NL() +
- " three" + NL() +
- " four" + NL() +
- " " + NL() +
+correct = "\n" +
+ " one\n" +
+ " two\n" +
+ " \n" +
+ " \n" +
+ " three\n" +
+ " four\n" +
+ " \n" +
"";
TEST(16, correct, x.toString());
@@ -175,14 +175,14 @@ TEST(17, correct, x.toXMLString());
XML.prettyIndent = 0;
-correct = "" + NL() +
- "one" + NL() +
- "two" + NL() +
- "" + NL() +
- "" + NL() +
- "three" + NL() +
- "four" + NL() +
- "" + NL() +
+correct = "\n" +
+ "one\n" +
+ "two\n" +
+ "\n" +
+ "\n" +
+ "three\n" +
+ "four\n" +
+ "\n" +
"";
TEST(18, correct, x.toString());
diff --git a/mozilla/js/tests/e4x/XMLList/13.5.2.js b/mozilla/js/tests/e4x/XMLList/13.5.2.js
index 82469b7ebb4..81bc182a136 100644
--- a/mozilla/js/tests/e4x/XMLList/13.5.2.js
+++ b/mozilla/js/tests/e4x/XMLList/13.5.2.js
@@ -58,7 +58,7 @@ y = new XMLList(x);
x += three;
-TEST(3, "one" + NL() + "two", y.toString());
+TEST(3, "one\ntwo", y.toString());
// Load from one XML type
x = new XMLList(one);
@@ -66,11 +66,11 @@ TEST_XML(4, "one", x);
// Load from Anonymous
x = new XMLList(<>onetwo>);
-TEST(5, "one" + NL() + "two", x.toString());
+TEST(5, "one\ntwo", x.toString());
// Load from Anonymous as string
x = new XMLList(<>onetwo>);
-TEST(6, "one" + NL() + "two", x.toString());
+TEST(6, "one\ntwo", x.toString());
// Load from single textnode
x = new XMLList("foobar");
diff --git a/mozilla/js/tests/e4x/XMLList/13.5.4.20.js b/mozilla/js/tests/e4x/XMLList/13.5.4.20.js
index a24addd48a4..2d498991fe7 100644
--- a/mozilla/js/tests/e4x/XMLList/13.5.4.20.js
+++ b/mozilla/js/tests/e4x/XMLList/13.5.4.20.js
@@ -50,6 +50,6 @@ TEST(2, "one", x.toString());
x = <>onetwo>;
-TEST(3, "one" + NL() + "two", x.toString());
+TEST(3, "one\ntwo", x.toString());
END();
\ No newline at end of file
diff --git a/mozilla/js/tests/e4x/XMLList/13.5.4.21.js b/mozilla/js/tests/e4x/XMLList/13.5.4.21.js
index 84c3e216f46..99767c95049 100644
--- a/mozilla/js/tests/e4x/XMLList/13.5.4.21.js
+++ b/mozilla/js/tests/e4x/XMLList/13.5.4.21.js
@@ -50,6 +50,6 @@ TEST(2, "one", x.toXMLString());
x = <>onetwo>;
-TEST(3, "one" + NL() + "two", x.toXMLString());
+TEST(3, "one\ntwo", x.toXMLString());
END();
\ No newline at end of file
diff --git a/mozilla/js/tests/e4x/browser.js b/mozilla/js/tests/e4x/browser.js
index 3b019c4ee3c..44160bb9a66 100644
--- a/mozilla/js/tests/e4x/browser.js
+++ b/mozilla/js/tests/e4x/browser.js
@@ -245,13 +245,4 @@ function quit()
{
}
-// override NL from shell.js.
-// assume running either on unix with \n line endings
-// or on windows under cygwin with \n line endings.
-
-function NL()
-{
- return '\n';
-}
-
window.onerror = reportError;
diff --git a/mozilla/js/tests/e4x/shell.js b/mozilla/js/tests/e4x/shell.js
index 54401356971..fac401b1e16 100644
--- a/mozilla/js/tests/e4x/shell.js
+++ b/mozilla/js/tests/e4x/shell.js
@@ -186,15 +186,6 @@ function END()
{
}
-function NL()
-{
- try {
- return java.lang.System.getProperty("line.separator");
- } catch (e) {
- return "\n";
- }
-}
-
/* JavaScriptOptions
encapsulate the logic for setting and retrieving the values
of the javascript options.