Index: e4x/shell.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/shell.js,v
retrieving revision 1.2
diff -p -u -1 -2 -r1.2 shell.js
--- e4x/shell.js 14 Oct 2004 07:09:21 -0000 1.2
+++ e4x/shell.js 25 Nov 2004 01:24:41 -0000
@@ -158,15 +158,19 @@ function TEST_XML(section, expected, act
function SHOULD_THROW(section)
{
reportFailure(section, "Expected to generate exception, actual behavior: no exception was thrown");
}
function END()
{
}
function NL()
{
- return java.lang.System.getProperty("line.separator");
+ try {
+ return java.lang.System.getProperty("line.separator");
+ } catch (e) {
+ return "\n";
+ }
}
Index: e4x/Expressions/11.1.1.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Expressions/11.1.1.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 11.1.1.js
--- e4x/Expressions/11.1.1.js 13 Oct 2004 21:35:28 -0000 1.1
+++ e4x/Expressions/11.1.1.js 25 Nov 2004 01:24:41 -0000
@@ -66,13 +66,13 @@ TEST(7, correct, x..@[q]);
correct = new XMLList();
correct += new XML("value1");
correct += new XML("value3");
correct += new XML("value2");
correct += new XML("value4");
TEST(8, correct, x..@*::attr1);
TEST_XML(9, "value1", x.bravo.@["attr1"]);
TEST_XML(10, "value3", x.bravo.@n::["attr1"]);
TEST_XML(11, "value3", x.bravo.@[q]);
-END();
\ No newline at end of file
+END();
Index: e4x/Expressions/11.1.2.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Expressions/11.1.2.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 11.1.2.js
--- e4x/Expressions/11.1.2.js 13 Oct 2004 21:35:28 -0000 1.1
+++ e4x/Expressions/11.1.2.js 25 Nov 2004 01:24:41 -0000
@@ -67,13 +67,13 @@ body = x.soap::["Body"];
TEST_XML(3, correct.toXMLString(), body);
q = new QName(soap, "Body");
body = x[q];
TEST_XML(4, correct.toXMLString(), body);
correct =
MYCO;
x.soap::Body.stock::getLastTradePrice.symbol = "MYCO";
TEST_XML(5, correct.toXMLString(), x.soap::Body.stock::getLastTradePrice.symbol);
-END();
\ No newline at end of file
+END();
Index: e4x/Expressions/11.1.3.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Expressions/11.1.3.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 11.1.3.js
--- e4x/Expressions/11.1.3.js 13 Oct 2004 21:35:28 -0000 1.1
+++ e4x/Expressions/11.1.3.js 25 Nov 2004 01:24:41 -0000
@@ -37,13 +37,13 @@
START("11.1.3 - Wildcard Identifiers");
x =
one
two
correct = <>onetwo>;
TEST(1, correct, x.*);
-END();
\ No newline at end of file
+END();
Index: e4x/Expressions/11.3.1.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Expressions/11.3.1.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 11.3.1.js
--- e4x/Expressions/11.3.1.js 13 Oct 2004 21:35:28 -0000 1.1
+++ e4x/Expressions/11.3.1.js 25 Nov 2004 01:24:42 -0000
@@ -253,13 +253,13 @@ x = ;
x.a.b = "foo";
delete x.a.b;
TEST_XML(10, "", x.a.b);
var ns = new Namespace("");
x.a.b = foo;
delete x.a.b;
TEST(11, "foo", x.a.ns::b.toString());
delete x.a.ns::b;
TEST_XML(12, "", x.a.ns::b);
-END();
\ No newline at end of file
+END();
Index: e4x/Expressions/11.6.1.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Expressions/11.6.1.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 11.6.1.js
--- e4x/Expressions/11.6.1.js 13 Oct 2004 21:35:28 -0000 1.1
+++ e4x/Expressions/11.6.1.js 25 Nov 2004 01:24:42 -0000
@@ -138,25 +138,25 @@ order =
-
CD Player
199.99
-
8-Track Player
69.99
;
order.@allids = order.item.@id;
-TEST_XML(3, 1234, order.@allids);
+TEST_XML(3, "1 2 3 4", order.@allids);
// Replace first child of the order element with an XML value
order =
John
948 Ranier Ave.
Portland
OR
-
Big Screen Television
@@ -302,25 +302,25 @@ order =
correct =
John
948 Ranier Ave.
Portland
OR
-
Big Screen Television
1299.99
- - A Text Node
+ - A Text Node
-
CD Player
199.99
-
8-Track Player
69.99
;
order.item[1] = "A Text Node";
@@ -410,13 +410,13 @@ item =
correct =
-
Mobile Phone
1299.99
item.description = "Mobile Phone";
TEST(9, item, correct);
-END();
\ No newline at end of file
+END();
Index: e4x/Regress/regress-257679.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Regress/regress-257679.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 regress-257679.js
--- e4x/Regress/regress-257679.js 14 Oct 2004 07:09:22 -0000 1.1
+++ e4x/Regress/regress-257679.js 25 Nov 2004 01:24:42 -0000
@@ -27,19 +27,19 @@
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the NPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the NPL or the GPL.
*/
START("Standalone should be allowed");
BUG(257679);
-var x = arbirary text ]]>;
+var x = arbitrary text ]]>;
-var expected = new XML(" arbirary text ]]>");
+var expected = new XML(" arbitrary text ]]>");
TEST(1, expected, x);
-END();
\ No newline at end of file
+END();
Index: e4x/Regress/regress-264369.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Regress/regress-264369.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 regress-264369.js
--- e4x/Regress/regress-264369.js 15 Oct 2004 13:33:02 -0000 1.1
+++ e4x/Regress/regress-264369.js 25 Nov 2004 01:24:42 -0000
@@ -34,13 +34,13 @@
* file under either the NPL or the GPL.
*/
START("toXMLString() should escape '>'");
BUG(264369);
var x = ;
var chars = "<>&";
x.b = chars;
TEST(1, "<>&", x.b.toXMLString());
-END();
\ No newline at end of file
+END();
Index: e4x/Types/9.1.1.3.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Types/9.1.1.3.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 9.1.1.3.js
--- e4x/Types/9.1.1.3.js 13 Oct 2004 21:35:30 -0000 1.1
+++ e4x/Types/9.1.1.3.js 25 Nov 2004 01:24:42 -0000
@@ -79,13 +79,13 @@ x =
correct =
one
two
three
;
delete x..@*;
TEST(4, correct, x);
-END();
\ No newline at end of file
+END();
Index: e4x/Types/9.1.1.9.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/Types/9.1.1.9.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 9.1.1.9.js
--- e4x/Types/9.1.1.9.js 13 Oct 2004 21:35:30 -0000 1.1
+++ e4x/Types/9.1.1.9.js 25 Nov 2004 01:24:42 -0000
@@ -59,26 +59,26 @@ x = oneonetwo;
TEST(6, true, (x == y) && (y == x));
y = onetwo;
TEST(7, false, (x == y) || (y == x));
// Logical equality
// Attribute order.
x = onetwo;
y = onetwo;
TEST(8, true, (x == y) && (y == x));
-// Skips empty text nodes
-XML.ignoreWhitespace = false;
+// Skips empty text nodes if ignoring whitespace
+// XML.ignoreWhitespace = false;
x = one ;
y = one;
TEST(9, true, (x == y) && (y == x));
// Doesn't trim text nodes.
x = one ;
y = one;
TEST(10, false, (x == y) || (y == x));
// Compare comments
XML.ignoreComments = false;
x = one;
@@ -115,13 +115,13 @@ y = <
TEST(17, true, (x == y) && (y == x));
y = one;
TEST(18, false, (x == y) || (y == x));
// Default namespace
default xml namespace = "http://foo/";
x = one;
y = one;
TEST(19, true, (x == y) && (y == x));
-END();
\ No newline at end of file
+END();
Index: e4x/XML/13.4.1.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/XML/13.4.1.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 13.4.1.js
--- e4x/XML/13.4.1.js 13 Oct 2004 21:35:30 -0000 1.1
+++ e4x/XML/13.4.1.js 25 Nov 2004 01:24:42 -0000
@@ -94,13 +94,13 @@ TEST_XML(6, 4, x);
x = XML(4);
TEST_XML(7, 4, x);
// Undefined and null should behave like ""
x = XML(null);
TEST_XML(8, "", x);
x = XML(undefined);
TEST_XML(9, "", x);
-END();
\ No newline at end of file
+END();
Index: e4x/XML/13.4.3.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/XML/13.4.3.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 13.4.3.js
--- e4x/XML/13.4.3.js 13 Oct 2004 21:35:30 -0000 1.1
+++ e4x/XML/13.4.3.js 25 Nov 2004 01:24:42 -0000
@@ -56,25 +56,25 @@ XML.ignoreComments = false;
x = one;
correct =
"" + NL() +
" " + NL() +
" one" + NL() +
"";
TEST_XML(7, correct, x);
// ignoreProcessingInstructions
-XML.defaultSettings();
+XML.setSettings();
x =
<>
one
>;
correct =
one
;
@@ -91,44 +91,44 @@ x =
>;
correct =
"" + NL() +
" " + NL() +
" one" + NL() +
"";
TEST_XML(9, correct, x);
// ignoreWhitespace
-XML.defaultSettings();
+XML.setSettings();
x = new XML(" \t\r\n\r\n \t\r\n\r\none \t\r\n\r\n");
correct =
"" + NL() +
" one" + NL() +
"";
TEST_XML(10, correct, x);
XML.ignoreWhitespace = false;
XML.prettyPrinting = false;
correct = " \n\n \n\none \n\n";
x = new XML(correct);
TEST_XML(11, correct, x);
// prettyPrinting
-XML.defaultSettings();
+XML.setSettings();
x =
one
two
three
four
;
@@ -175,46 +175,46 @@ correct = "" + NL() +
"two" + NL() +
"" + NL() +
"" + NL() +
"three" + NL() +
"four" + NL() +
"" + NL() +
"";
TEST(18, correct, x.toString());
TEST(19, correct, x.toXMLString());
// settings()
-XML.defaultSettings();
+XML.setSettings();
o = XML.settings();
TEST(20, true, o.ignoreComments);
TEST(21, true, o.ignoreProcessingInstructions);
TEST(22, true, o.ignoreWhitespace);
TEST(23, true, o.prettyPrinting);
TEST(24, 2, o.prettyIndent);
// setSettings()
o = XML.settings();
o.ignoreComments = false;
o.ignoreProcessingInstructions = false;
o.ignoreWhitespace = false;
o.prettyPrinting = false;
o.prettyIndent = 7;
XML.setSettings(o);
o = XML.settings();
TEST(25, false, o.ignoreComments);
TEST(26, false, o.ignoreProcessingInstructions);
TEST(27, false, o.ignoreWhitespace);
TEST(28, false, o.prettyPrinting);
TEST(29, 7, o.prettyIndent);
-// defaultSettings()
-XML.defaultSettings();
+// setSettings()
+XML.setSettings();
o = XML.settings();
TEST(30, true, o.ignoreComments);
TEST(31, true, o.ignoreProcessingInstructions);
TEST(32, true, o.ignoreWhitespace);
TEST(33, true, o.prettyPrinting);
TEST(34, 2, o.prettyIndent);
-END();
\ No newline at end of file
+END();
Index: e4x/XML/13.4.4.38.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/XML/13.4.4.38.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 13.4.4.38.js
--- e4x/XML/13.4.4.38.js 13 Oct 2004 21:35:31 -0000 1.1
+++ e4x/XML/13.4.4.38.js 25 Nov 2004 01:24:42 -0000
@@ -41,25 +41,25 @@ TEST(1, true, XML.prototype.hasOwnProper
XML.prettyPrinting = false;
x =
one
two
;
TEST(2, "one", x.bravo.toString());
-TEST(3, "one" + NL() + "two", x..bravo.toString());
+TEST(3, "onetwo", x..bravo.toString());
x =
one
;
TEST(4, "", x.charlie.toString());
x =
one
@@ -78,23 +78,23 @@ x =
;
TEST(5, "two", x.charlie.toString());
x =
;
-TEST(6, "" + NL() + "", x.bravo.toString());
+TEST(6, "", x.bravo.toString());
x =
one
two
;
-TEST(7, "one" + NL() + "two", x.bravo.toString());
+TEST(7, "onetwo", x.bravo.toString());
-END();
\ No newline at end of file
+END();
Index: e4x/XML/13.4.4.39.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/XML/13.4.4.39.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 13.4.4.39.js
--- e4x/XML/13.4.4.39.js 13 Oct 2004 21:35:31 -0000 1.1
+++ e4x/XML/13.4.4.39.js 25 Nov 2004 01:24:42 -0000
@@ -41,25 +41,25 @@ TEST(1, true, XML.prototype.hasOwnProper
XML.prettyPrinting = false;
x =
one
two
;
TEST(2, "one", x.bravo.toXMLString());
-TEST(3, "one" + NL() + "two", x..bravo.toXMLString());
+TEST(3, "onetwo", x..bravo.toXMLString());
x =
one
;
TEST(4, "", x.charlie.toXMLString());
x =
one
@@ -78,33 +78,33 @@ x =
;
TEST(6, "two", x.charlie.toXMLString());
x =
;
-TEST(7, "" + NL() + "", x.bravo.toXMLString());
+TEST(7, "", x.bravo.toXMLString());
x =
one
two
;
-TEST(8, "one" + NL() + "two", x.bravo.toXMLString());
+TEST(8, "onetwo", x.bravo.toXMLString());
XML.prettyPrinting = true;
x =
one
two
;
copy = x.bravo.copy();
TEST(9, "one", copy.toXMLString());
Index: e4x/XMLList/13.5.4.16.js
===================================================================
RCS file: /cvsroot/mozilla/js/tests/e4x/XMLList/13.5.4.16.js,v
retrieving revision 1.1
diff -p -u -1 -2 -r1.1 13.5.4.16.js
--- e4x/XMLList/13.5.4.16.js 13 Oct 2004 21:35:31 -0000 1.1
+++ e4x/XMLList/13.5.4.16.js 25 Nov 2004 01:24:42 -0000
@@ -59,13 +59,13 @@ TEST(3, x, y.parent());
// If items have different parents then return undefined
y = new XMLList();
y += x.bravo;
y += x.bravo.charlie;
TEST(4, undefined, y.parent());
y = x..charlie;
TEST(5, undefined, y.parent());
-END();
\ No newline at end of file
+END();