Bug 833208 (part 2) - Remove e4x support from jstests. r=jorendorff.

--HG--
rename : js/src/tests/e4x/Statements/12.3-01.js => js/src/tests/js1_6/extensions/nested-for-each.js
rename : js/src/tests/e4x/Regress/regress-355569.js => js/src/tests/js1_8_5/regress/regress-355569.js
rename : js/src/tests/e4x/Regress/regress-477053.js => js/src/tests/js1_8_5/regress/regress-477053.js
rename : js/src/tests/e4x/Regress/regress-561031.js => js/src/tests/js1_8_5/regress/regress-561031.js
extra : rebase_source : d146e304a8d31b1536804f86929628a638ff3269
This commit is contained in:
Nicholas Nethercote 2013-01-28 14:25:15 -08:00
parent c1813bf2c4
commit 99a6a6c1a5
381 changed files with 38 additions and 15731 deletions

View File

@ -158,10 +158,7 @@ function options(aOptionName)
value = value.substring(0, value.length-1);
}
if (aOptionName === 'moar_xml')
aOptionName = 'xml';
if (aOptionName && aOptionName !== 'allow_xml') {
if (aOptionName) {
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
if (!(aOptionName in Components.utils)) {
// if (!(aOptionName in SpecialPowers.wrap(Components).utils)) {
@ -193,7 +190,6 @@ function optionsInit() {
strict: true,
werror: true,
atline: true,
moar_xml: true,
methodjit: true,
methodjit_always: true,
strict_mode: true
@ -211,8 +207,6 @@ function optionsInit() {
for (var optionName in options.currvalues)
{
var propName = optionName;
if (optionName === "moar_xml")
propName = "xml";
// if (!(propName in SpecialPowers.wrap(Components).utils))
if (!(propName in Components.utils))
@ -361,25 +355,18 @@ function jsTestDriverBrowserInit()
outputscripttag(suitepath + '/browser.js', properties);
outputscripttag(suitepath + '/' + subsuite + '/shell.js', properties);
outputscripttag(suitepath + '/' + subsuite + '/browser.js', properties);
outputscripttag(suitepath + '/' + subsuite + '/' + test, properties,
properties.e4x || /e4x\//.test(properties.test));
outputscripttag(suitepath + '/' + subsuite + '/' + test, properties);
outputscripttag('js-test-driver-end.js', properties);
return;
}
function outputscripttag(src, properties, e4x)
function outputscripttag(src, properties)
{
if (!src)
{
return;
}
if (e4x)
{
// e4x requires type=mimetype;e4x=1
properties.language = 'type';
}
var s = '<script src="' + src + '" ';
if (properties.language != 'type')
@ -397,10 +384,6 @@ function outputscripttag(src, properties, e4x)
{
s += ';version=' + properties.version;
}
if (e4x)
{
s += ';e4x=1';
}
}
s += '"><\/script>';

View File

@ -1,49 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.1.1 - Attribute Identifiers");
x =
<alpha>
<bravo attr1="value1" ns:attr1="value3" xmlns:ns="http://someuri">
<charlie attr1="value2" ns:attr1="value4"/>
</bravo>
</alpha>
TEST_XML(1, "value1", x.bravo.@attr1);
TEST_XML(2, "value2", x.bravo.charlie.@attr1);
correct = new XMLList();
correct += new XML("value1");
correct += new XML("value2");
TEST(3, correct, x..@attr1);
n = new Namespace("http://someuri");
TEST_XML(4, "value3", x.bravo.@n::attr1);
TEST_XML(5, "value4", x.bravo.charlie.@n::attr1);
correct = new XMLList();
correct += new XML("value3");
correct += new XML("value4");
TEST(6, correct, x..@n::attr1);
q = new QName(n, "attr1");
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();

View File

@ -1,50 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.1.2 - Qualified Identifiers");
x =
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<soap:Body>
<m:getLastTradePrice xmlns:m="http://mycompany.com/stocks">
<symbol>DIS</symbol>
</m:getLastTradePrice>
</soap:Body>
</soap:Envelope>;
soap = new Namespace("http://schemas.xmlsoap.org/soap/envelope/");
stock = new Namespace("http://mycompany.com/stocks");
encodingStyle = x.@soap::encodingStyle;
TEST_XML(1, "http://schemas.xmlsoap.org/soap/encoding/", encodingStyle);
correct =
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<m:getLastTradePrice xmlns:m="http://mycompany.com/stocks">
<symbol>DIS</symbol>
</m:getLastTradePrice>
</soap:Body>;
body = x.soap::Body;
TEST_XML(2, correct.toXMLString(), body);
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 =
<symbol xmlns:m="http://mycompany.com/stocks" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">MYCO</symbol>;
x.soap::Body.stock::getLastTradePrice.symbol = "MYCO";
TEST_XML(5, correct.toXMLString(), x.soap::Body.stock::getLastTradePrice.symbol);
END();

View File

@ -1,20 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.1.3 - Wildcard Identifiers");
x =
<alpha>
<bravo>one</bravo>
<charlie>two</charlie>
</alpha>
correct = <><bravo>one</bravo><charlie>two</charlie></>;
TEST(1, correct, x.*);
END();

View File

@ -1,29 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '11.1.4 - XML Initializer should accept single processing ' +
'instruction';
var BUGNUMBER = 257679;
var actual = '';
var expect = 'processing-instruction';
printBugNumber(BUGNUMBER);
START(summary);
XML.ignoreProcessingInstructions = false;
print("XML.ignoreProcessingInstructions: " + XML.ignoreProcessingInstructions);
var pi = <?process Kibology="on"?>;
if (pi) {
actual = pi.nodeKind();
}
else {
actual = 'undefined';
}
TEST(1, expect, actual);
END();

View File

@ -1,26 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - XML Initializer should accept single CDATA Section";
var BUGNUMBER = 257679;
var actual = '';
var expect = 'text';
printBugNumber(BUGNUMBER);
START(summary);
var cdataText = <![CDATA[Kibology for all.<br>All for Kibology.]]>;
if (cdataText) {
actual = cdataText.nodeKind();
}
else {
actual = 'undefined';
}
TEST(1, expect, actual);
END();

View File

@ -1,28 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '11.1.4 - XML Initializer should accept single comment';
var BUGNUMBER = 257679;
var actual = '';
var expect = 'comment';
printBugNumber(BUGNUMBER);
START(summary);
XML.ignoreComments = false;
print("XML.ignoreComments: " + XML.ignoreComments);
var comment = <!-- comment -->;
if (comment) {
actual = comment.nodeKind();
}
else {
actual = 'undefined';
}
TEST(1, expect, actual);
END();

View File

@ -1,24 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - XML Initializer - Comment hiding parsing/scanning";
var BUGNUMBER = 311157;
var actual;
var expect;
printBugNumber(BUGNUMBER);
START(summary);
var x = <hi> <!-- duh -->
there </hi>;
actual = x.toString();
expect = '\n there ';
TEST(1, expect, actual);
END();

View File

@ -1,25 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - XML Initializer - Comment hiding parsing/scanning";
var BUGNUMBER = 311157;
var actual;
var expect;
printBugNumber(BUGNUMBER);
START(summary);
XML.ignoreWhitespace = false;
var x = <bye> <![CDATA[ duh ]]>
there </bye>;
actual = x.toString();
expect = ' duh \n there ';
TEST(1, expect, actual);
END();

View File

@ -1,29 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - ]] should be allowed in CDATA Section";
var BUGNUMBER = 313929;
var actual = 'No error';
var expect = 'No error';
printBugNumber(BUGNUMBER);
START(summary);
try
{
actual = XML("<x><![CDATA[ ]] ]]></x>").toString();
}
catch(e)
{
actual = e + '';
}
expect = (<x> ]] </x>).toString();
TEST(1, expect, actual);
END();

View File

@ -1,46 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - XML Initializer - <p:{b}b>x</p:bb>";
var BUGNUMBER = 321549;
var actual = 'No error';
var expect = 'No error';
printBugNumber(BUGNUMBER);
START(summary);
var b = 'b';
try
{
actual = (<a xmlns:p='http://a.uri/'><p:b{b}>x</p:bb></a>).
toString();
}
catch(e)
{
actual = e + '';
}
expect = (<a xmlns:p='http://a.uri/'><p:bb>x</p:bb></a>).toString();
TEST(1, expect, actual);
try
{
actual = (<a xmlns:p='http://a.uri/'><p:{b}b>x</p:bb></a>).
toString();
}
catch(e)
{
actual = e + '';
}
expect = (<a xmlns:p='http://a.uri/'><p:bb>x</p:bb></a>).toString();
TEST(2, expect, actual);
END();

View File

@ -1,126 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) fails
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.4 - XML Initializer - {} Expressions - 08";
var BUGNUMBER = 325750;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
printStatus('E4X: inconsistencies in the use of {} syntax Part Deux');
// https://bugzilla.mozilla.org/show_bug.cgi?id=318922
// https://bugzilla.mozilla.org/show_bug.cgi?id=321549
var exprs = [];
var iexpr;
exprs.push({expr: 'b=\'\\\'\';\na=<a>\n <b c=\'c{b}>x</b>\n</a>;', valid: false});
exprs.push({expr: 'b=\'\\\'\';\na=<a>\n <b c={b}c\'>x</b>\n</a>;', valid: false});
exprs.push({expr: 'b=\'b\';\na=<a xmlns:p=\'http://a.uri/\'>\n <p:b{b}>x</p:bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a xmlns:p=\'http://a.uri/\'>\n <p:b{b}>x</p:bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a xmlns:p=\'http://a.uri/\'>\n <p:{b}b>x</p:bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a xmlns:p=\'http://a.uri/\'>\n <p:{b}b>x</p:bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a xmlns:p=\'http://a.uri/\'>\n <{b}b>x</bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a>\n <b{b}>x</bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a>\n <{b+\'b\'}>x</bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'b\';\na=<a>\n <{b}b>x</bb>\n</a>;', valid: true});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b c=\'c\'{b}>x</b>\n</a>;', valid: false});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b c={b}>x</b>\n</a>;', valid: true});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b c={b}\'c\'>x</b>\n</a>;', valid: false});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b c{b}=\'c\'>x</b>\n</a>;', valid: true});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b {b+\'c\'}=\'c\'>x</b>\n</a>;', valid: true});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b {b}=\'c\'>x</b>\n</a>;', valid: true});
exprs.push({expr: 'b=\'c\';\na=<a>\n <b {b}c=\'c\'>x</b>\n</a>;', valid: true});
exprs.push({expr: 'm=1;\na=<a>\n x {m} z\n</a>;', valid: true});
exprs.push({expr: 'm=1;\na=new XML(m);', valid: true});
exprs.push({expr: 'm=<m><n>o</n></m>;\na=<a>\n <b>x {m} z</b>\n</a>;', valid: true});
exprs.push({expr: 'm=<m><n>o</n></m>;\na=<a>\n <{m}>x z</{m}>\n</a>;', valid: false});
exprs.push({expr: 'm=<m>o</m>;\na=<a>\n <{m}>x z</{m}>\n</a>;', valid: true});
exprs.push({expr: 'm=[1,\'x\'];\na=<a>\n x {m} z\n</a>;', valid: true});
exprs.push({expr: 'm=[1,\'x\'];\na=new XML(m);', valid: false});
exprs.push({expr: 'm=[1];\na=new XML(m);', valid: false});
exprs.push({expr: 'm=\'<m><n>o</n></m>\';\na=<a>\n <b>x {m} z</b>\n</a>;', valid: true});
exprs.push({expr: 'm=\'<m><n>o</n></m>\';\na=<a>\n x {m} z\n</a>;', valid: true});
exprs.push({expr: 'm=\'x\';\na=new XML(m);', valid: true});
exprs.push({expr: 'm=new Date();\na=new XML(m);', valid: false});
exprs.push({expr: 'm=new Number(\'1\');\na=new XML(m);', valid: true});
exprs.push({expr: 'm=new String(\'x\');\na=new XML(\'<a>\\n {m}\\n</a>\');', valid: true});
exprs.push({expr: 'm=new String(\'x\');\na=new XML(m);', valid: true});
exprs.push({expr: 'm={a:1,b:\'x\'};\na=<a>\n x {m} z\n</a>;', valid: true});
exprs.push({expr: 'm={a:1,b:\'x\'};\na=new XML(m);', valid: false});
exprs.push({expr: 'p="p";\nu=\'http://a.uri/\';\na=<a xmlns:p{p}={\'x\',1,u}>\n <pp:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'p="p";\nu=\'http://a.uri/\';\na=<a xmlns:{p}p={\'x\',1,u}>\n <pp:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'p="pp";\nu=\'http://a.uri/\';\na=<a xmlns:{p}={\'x\',1,u}>\n <pp:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\na=<a xmlns:p={(function(){return u})()}>\n <p:b>x</p:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\na=<a xmlns:p={\'x\',1,u}>\n <p:b>x</p:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\na=<a xmlns:p={u}>\n <{u}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\na=<a xmlns:p={var d=2,u}>\n <p:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace("p",u);\na=<a xmlns:p={n}>\n <{u}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace("p",u);\na=<a xmlns:p={u}>\n <{u}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace("p",u);\na=<a xmlns:{n}={n}>\n <p:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace("p",u);\na=<a xmlns:{n}={n}>\n <{n}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace(u);\na=<a xmlns:p={n}>\n <p:b>x</p:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace(u);\na=<a xmlns:p={n}>\n <{n}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace(u);\na=<a xmlns:p={u}>\n <p:b>x</p:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace(u);\na=<a xmlns:p={u}>\n <{n}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\nn=new Namespace(u);\na=<a xmlns:p={u}>\n <{n}:b>x</p:b>\n</a>;', valid: false});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\na=<a xmlns:p={u}>\n <{p}:b>x</p:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\na=<a xmlns:pp={u}>\n <p{p}:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\na=<a xmlns:pp={u}>\n <{p}p:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\nns="ns";\na=<a xml{ns}:pp={u}>\n <{p}p:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\nns="xmlns";\na=<a {ns}:pp={u}>\n <{p}p:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'p\';\nxml="xml";\na=<a {xml}ns:pp={u}>\n <{p}p:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\np=\'pp\';\na=<a xmlns:pp={u}>\n <{p}:b>x</pp:b>\n</a>;', valid: true});
exprs.push({expr: 'u=\'http://a.uri/\';\nu2=\'http://uri2.sameprefix/\';\nn=new Namespace(\'p\',u2);\na=<a xmlns:p={u}>\n <{n}:b>x</p:b>\n</a>;', valid: false}); // This should always fail
for (iexpr = 0; iexpr < exprs.length; ++iexpr)
{
evalStr(exprs, iexpr);
}
END();
function evalStr(exprs, iexpr)
{
var value;
var valid;
var passfail;
var obj = exprs[iexpr];
try
{
value = eval(obj.expr).toXMLString();
valid = true;
}
catch(ex)
{
value = ex + '';
valid = false;
}
passfail = (valid === obj.valid);
msg = iexpr + ': ' + (passfail ? 'PASS':'FAIL') +
' expected: ' + (obj.valid ? 'valid':'invalid') +
', actual: ' + (valid ? 'valid':'invalid') + '\n' +
'input: ' + '\n' +
obj.expr + '\n' +
'output: ' + '\n' +
value + '\n\n';
printStatus(msg);
TEST(iexpr, obj.valid, valid);
return passfail;
}

View File

@ -1,104 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.1.4 - XML Initializer");
person = <person><name>John</name><age>25</age></person>;
TEST(1, <person><name>John</name><age>25</age></person>, person);
e = <employees>
<employee id = "1"><name>Joe</name><age>20</age></employee>
<employee id = "2"><name>Sue</name><age>30</age></employee>
</employees>;
TEST_XML(2, 1, e.employee[0].@id);
correct = <name>Sue</name>;
TEST(3, correct, e.employee[1].name);
names = new Array();
names[0] = "Alpha";
names[1] = "Bravo";
names[2] = "Charlie";
names[3] = "Delta";
names[4] = "Echo";
names[5] = "Golf";
names[6] = "Hotel";
names[7] = "India";
names[8] = "Juliet";
names[9] = "Kilo";
ages = new Array();
ages[0] = "20";
ages[1] = "21";
ages[2] = "22";
ages[3] = "23";
ages[4] = "24";
ages[5] = "25";
ages[6] = "26";
ages[7] = "27";
ages[8] = "28";
ages[9] = "29";
for (i = 0; i < 10; i++)
{
e.*[i] = <employee id={i}>
<name>{names[i].toUpperCase()}</name>
<age>{ages[i]}</age>
</employee>;
correct = new XML("<employee id=\"" + i + "\"><name>" + names[i].toUpperCase() + "</name><age>" + ages[i] + "</age></employee>");
TEST(4 + i, correct, e.*[i]);
}
tagName = "name";
attributeName = "id";
attributeValue = 5;
content = "Fred";
x = <{tagName} {attributeName}={attributeValue}>{content}</{tagName}>;
TEST(14, "<name id=\"5\">Fred</name>", x.toXMLString());
// Test {} on XML and XMLList types
x =
<rectangle>
<length>30</length>
<width>50</width>
</rectangle>;
correct =
<rectangle>
<width>50</width>
<length>30</length>
</rectangle>;
x = <rectangle>{x.width}{x.length}</rectangle>;
TEST(15, correct, x);
var content = "<foo name=\"value\">bar</foo>";
x = <x><a>{content}</a></x>;
correct = <x/>;
correct.a = content;
TEST(16, correct, x);
x = <x a={content}/>;
correct = <x/>;
correct.@a = content;
TEST(17, correct, x);
a = 5;
b = 3;
c = "x";
x = <{c} a={a + " < " + b + " is " + (a < b)}>{a + " < " + b + " is " + (a < b)}</{c}>;
TEST(18, "<x a=\"5 &lt; 3 is false\">5 &lt; 3 is false</x>", x.toXMLString());
x = <{c} a={a + " > " + b + " is " + (a > b)}>{a + " > " + b + " is " + (a > b)}</{c}>;
TEST(19, "<x a=\"5 > 3 is true\">5 &gt; 3 is true</x>", x.toXMLString());
END();

View File

@ -1,26 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.1.5 - XMLList Initializer");
docfrag = <><name>Phil</name><age>35</age><hobby>skiing</hobby></>;
TEST(1, "xml", typeof(docfrag));
correct = <name>Phil</name>;
TEST(2, correct, docfrag[0]);
emplist = <>
<employee id="0"><name>Jim</name><age>25</age></employee>
<employee id="1"><name>Joe</name><age>20</age></employee>
<employee id="2"><name>Sue</name><age>30</age></employee>
</>;
TEST(3, "xml", typeof(emplist));
TEST_XML(4, 2, emplist[2].@id);
END();

View File

@ -1,138 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.2.1 - Property Accessors");
order =
<order id="123456" timestamp="Mon Mar 10 2003 16:03:25 GMT-0800 (PST)">
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
</order>;
correct =
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
</customer>;
TEST(1, correct, order.customer);
TEST_XML(2, 123456, order.@id);
correct =
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
TEST(3, correct, order.children()[1]);
correct =
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
</customer> +
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>;
TEST(4, correct, order.*);
correct = new XMLList();
correct += new XML("123456");
correct += new XML("Mon Mar 10 2003 16:03:25 GMT-0800 (PST)");
TEST(5, correct, order.@*);
order = <order>
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
</customer>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
correct =
<description>Big Screen Television</description> +
<description>DVD Player</description>;
TEST(6, correct, order.item.description);
correct = new XMLList();
correct += new XML("3456");
correct += new XML("56789");
TEST(7, correct, order.item.@id);
correct =
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
TEST(8, correct, order.item[1]);
correct =
<description>Big Screen Television</description> +
<price>1299.99</price> +
<quantity>1</quantity> +
<description>DVD Player</description> +
<price>399.99</price> +
<quantity>1</quantity>;
TEST(9, correct, order.item.*);
correct=
<price>1299.99</price>;
TEST(10, correct, order.item.*[1]);
// The spec requires that we get the first (and only) order [treating single element as a list].
// We ignore this for xml objects that can have children and always return children for numeric
// property names.
// order = <order>
// <customer>
// <firstname>John</firstname>
// <lastname>Doe</lastname>
// </customer>
// <item id="3456">
// <description>Big Screen Television</description>
// <price>1299.99</price>
// <quantity>1</quantity>
// </item>
// <item id="56789">
// <description>DVD Player</description>
// <price>399.99</price>
// <quantity>1</quantity>
// </item>
// </order>;
// TEST(11, order, order[0]);
// Any other index should return undefined, but we return the other child.
// TEST(12, undefined, order[1]);
END();

View File

@ -1,70 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.2.2 - Function Calls");
rectangle = <rectangle>
<x>50</x>
<y>75</y>
<length>20</length>
<width>30</width>
</rectangle>;
TEST(1, 1, rectangle.length());
TEST(2, <length>20</length>, rectangle.length);
shipto = <shipto>
<name>Fred Jones</name>
<street>123 Foobar Ave.</street>
<citystatezip>Redmond, WA, 98008</citystatezip>
</shipto>;
upperName = shipto.name.toUpperCase();
TEST(3, "FRED JONES", upperName);
upperName = shipto.name.toString().toUpperCase();
TEST(4, "FRED JONES", upperName);
upperName = shipto.name.toUpperCase();
TEST(5, "FRED JONES", upperName);
citystatezip = shipto.citystatezip.split(", ");
state = citystatezip[1];
TEST(6, "WA", state);
zip = citystatezip[2];
TEST(7, "98008", zip);
citystatezip = shipto.citystatezip.toString().split(", ");
state = citystatezip[1];
TEST(8, "WA", state);
zip = citystatezip[2];
TEST(9, "98008", zip);
// Test method name/element name conflicts
x =
<alpha>
<name>Foo</name>
<length>Bar</length>
</alpha>;
TEST(10, <name>Foo</name>, x.name);
TEST(11, QName("alpha"), x.name());
TEST(12, <length>Bar</length>, x.length);
TEST(13, 1, x.length());
TEST(14, x, x.(name == "Foo"));
x.name = "foobar";
TEST(15, <name>foobar</name>, x.name);
TEST(16, QName("alpha"), x.name());
END();

View File

@ -1,25 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.2.3 - XML Descendant Accessor");
e =
<employees>
<employee id="1"><name>Joe</name><age>20</age></employee>
<employee id="2"><name>Sue</name><age>30</age></employee>
</employees>
names = e..name;
correct =
<name>Joe</name> +
<name>Sue</name>;
TEST(1, correct, names);
END();

View File

@ -1,81 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.2.4 - XML Filtering Predicate Operator");
e = <employees>
<employee id="0"><name>John</name><age>20</age></employee>
<employee id="1"><name>Sue</name><age>30</age></employee>
</employees>;
correct = <employee id="0"><name>John</name><age>20</age></employee>;
john = e.employee.(name == "John");
TEST(1, correct, john);
john = e.employee.(name == "John");
TEST(2, correct, john);
correct =
<employee id="0"><name>John</name><age>20</age></employee> +
<employee id="1"><name>Sue</name><age>30</age></employee>;
twoEmployees = e.employee.(@id == 0 || @id == 1);
TEST(3, correct, twoEmployees);
twoEmployees = e.employee.(@id == 0 || @id == 1);
TEST(4, correct, twoEmployees);
i = 0;
twoEmployees = new XMLList();
for each (var p in e..employee)
{
if (p.@id == 0 || p.@id == 1)
{
twoEmployees += p;
}
}
TEST(5, correct, twoEmployees);
i = 0;
twoEmployees = new XMLList();
for each (var p in e..employee)
{
if (p.@id == 0 || p.@id == 1)
{
twoEmployees[i++] = p;
}
}
TEST(6, correct, twoEmployees);
// test with syntax
e = <employees>
<employee id="0"><name>John</name><age>20</age></employee>
<employee id="1"><name>Sue</name><age>30</age></employee>
</employees>;
correct =
<employee id="0"><name>John</name><age>20</age></employee> +
<employee id="1"><name>Sue</name><age>30</age></employee>;
i = 0;
twoEmployees = new XMLList();
for each (var p in e..employee)
{
with (p)
{
if (@id == 0 || @id == 1)
{
twoEmployees[i++] = p;
}
}
}
TEST(7, correct, twoEmployees);
END();

View File

@ -1,236 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.3.1 - Delete Operator");
order =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
// Delete the customer address
correct =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
delete order.customer.address;
TEST_XML(1, "", order.customer.address);
TEST(2, correct, order);
order =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
// delete the custmomer ID
correct =
<order id="123456">
<customer>
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
delete order.customer.@id;
TEST_XML(3, "", order.customer.@id);
TEST(4, correct, order);
order =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
// delete the first item price
correct =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
delete order.item.price[0];
TEST_XML(5, "", order.item[0].price);
TEST(6, <price>1299.99</price>, order.item.price[0]);
TEST(7, order, correct);
order =
<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="3456">
<description>Big Screen Television</description>
<price>1299.99</price>
<quantity>1</quantity>
</item>
<item id="56789">
<description>DVD Player</description>
<price>399.99</price>
<quantity>1</quantity>
</item>
</order>;
// delete all the items
correct =<order id="123456">
<customer id="123">
<firstname>John</firstname>
<lastname>Doe</lastname>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
</order>;
delete order.item;
TEST_XML(8, "", order.item);
TEST(9, correct, order);
default xml namespace = "http://someuri";
x = <x/>;
x.a.b = "foo";
delete x.a.b;
TEST_XML(10, "", x.a.b);
var ns = new Namespace("");
x.a.b = <b xmlns="">foo</b>;
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();

View File

@ -1,16 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.3.2 - Typeof Operator");
x = new XML();
TEST(1, "xml", typeof(x));
x = new XMLList();
TEST(2, "xml", typeof(x));
END();

View File

@ -1,103 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.4.1 - Addition Operator");
employeeData = <name>Fred</name> + <age>28</age> + <hobby>skiing</hobby>;
TEST(1, "xml", typeof(employeeData));
correct = <><name>Fred</name><age>28</age><hobby>skiing</hobby></>;
TEST(2, correct, employeeData);
order = <order>
<item>
<description>Big Screen Television</description>
</item>
<item>
<description>DVD Player</description>
</item>
<item>
<description>CD Player</description>
</item>
<item>
<description>8-Track Player</description>
</item>
</order>;
correct =
<item><description>Big Screen Television</description></item> +
<item><description>CD Player</description></item> +
<item><description>8-Track Player</description></item>;
myItems = order.item[0] + order.item[2] + order.item[3];
TEST(3, "xml", typeof(myItems));
TEST(4, correct, myItems);
correct =
<item><description>Big Screen Television</description></item> +
<item><description>DVD Player</description></item> +
<item><description>CD Player</description></item> +
<item><description>8-Track Player</description></item> +
<item><description>New Item</description></item>;
newItems = order.item + <item><description>New Item</description></item>;
TEST(5, "xml", typeof(newItems));
TEST(6, correct, newItems);
order =
<order>
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item>
<description>DVD Player</description>
<price>399.99</price>
</item>
<item>
<description>CD Player</description>
<price>199.99</price>
</item>
<item>
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
totalPrice = +order.item[0].price + +order.item[1].price;
TEST(7, "number", typeof(totalPrice));
TEST(8, 1699.98, totalPrice);
totalPrice = Number(order.item[1].price) + Number(order.item[3].price);
TEST(9, 469.98, totalPrice);
order =
<order>
<customer>
<address>
<street>123 Foobar Ave.</street>
<city>Bellevue</city>
<state>WA</state>
<zip>98008</zip>
</address>
</customer>
</order>;
streetCity = "" + order.customer.address.street + order.customer.address.city;
TEST(10, "string", typeof(streetCity));
TEST(11, "123 Foobar Ave.Bellevue", streetCity);
statezip = String(order.customer.address.state) + order.customer.address.zip;
TEST(12, "string", typeof(statezip));
TEST(13, "WA98008", statezip);
END();

View File

@ -1,65 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.5.1 - Equality Operators");
x = <alpha>one</alpha>;
y = <alpha>one</alpha>;
TEST(1, true, (x == y) && (y == x));
// Should return false if comparison is not XML
y = "<alpha>one</alpha>";
TEST(2, false, (x == y) || (y == x));
y = undefined
TEST(3, false, (x == y) || (y == x));
y = null
TEST(4, false, (x == y) || (y == x));
// Should check logical equiv.
x = <alpha attr1="value1">one<bravo attr2="value2">two</bravo></alpha>;
y = <alpha attr1="value1">one<bravo attr2="value2">two</bravo></alpha>;
TEST(5, true, (x == y) && (y == x));
y = <alpha attr1="new value">one<bravo attr2="value2">two</bravo></alpha>;
TEST(6, false, (x == y) || (y == x));
m = new Namespace();
n = new Namespace();
TEST(7, true, m == n);
m = new Namespace("uri");
TEST(8, false, m == n);
n = new Namespace("ns", "uri");
TEST(9, true, m == n);
m = new Namespace(n);
TEST(10, true, m == n);
TEST(11, false, m == null);
TEST(12, false, null == m);
m = new Namespace("ns", "http://anotheruri");
TEST(13, false, m == n);
p = new QName("a");
q = new QName("b");
TEST(14, false, p == q);
q = new QName("a");
TEST(15, true, p == q);
q = new QName("http://someuri", "a");
TEST(16, false, p == q);
q = new QName(null, "a");
TEST(16, false, p == q);
END();

View File

@ -1,393 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.6.1 - XML Assignment");
// Change the value of the id attribute on the second item
order =
<order>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
correct =
<order>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="1.23">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.item[1].@id = 1.23;
TEST(1, correct, order);
// Add a new attribute to the second item
order =
<order>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
correct =
<order>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2" newattr="new value">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.item[1].@newattr = "new value";
TEST(2, correct, order);
// Construct an attribute list containing all the ids in this order
order =
<order>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.@allids = order.item.@id;
TEST_XML(3, "1 2 3 4", order.@allids);
// Replace first child of the order element with an XML value
order =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.*[0] =
<customer>
<name>Fred</name>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>;
correct =
<order>
<customer>
<name>Fred</name>
<address>123 Foobar Ave.</address>
<city>Bellevue</city>
<state>WA</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
TEST(4, correct, order);
// Replace the second child of the order element with a list of items
order =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
correct =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item>item one</item>
<item>item two</item>
<item>item three</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.item[0] = <item>item one</item> +
<item>item two</item> +
<item>item three</item>;
TEST(5, correct, order);
// Replace the third child of the order with a text node
order =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
correct =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">A Text Node</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
order.item[1] = "A Text Node";
TEST(6, correct, order);
// append a new item to the end of the order
order =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
</order>;
correct =
<order>
<customer>
<name>John</name>
<address>948 Ranier Ave.</address>
<city>Portland</city>
<state>OR</state>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
<item id="3">
<description>CD Player</description>
<price>199.99</price>
</item>
<item id="4">
<description>8-Track Player</description>
<price>69.99</price>
</item>
<item>new item</item>
</order>;
order.*[order.*.length()] = <item>new item</item>;
TEST(7, correct, order);
// Change the price of the item
item =
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
correct =
<item>
<description>Big Screen Television</description>
<price>99.95</price>
</item>
item.price = 99.95;
TEST(8, item, correct);
// Change the description of the item
item =
<item>
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
correct =
<item>
<description>Mobile Phone</description>
<price>1299.99</price>
</item>
item.description = "Mobile Phone";
TEST(9, item, correct);
END();

View File

@ -1,290 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.6.2 - XMLList Assignment");
// Set the name of the only customer in the order to Fred Jones
order =
<order>
<customer>
<name>John Smith</name>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
</order>;
correct =
<order>
<customer>
<name>Fred Jones</name>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
</order>;
order.customer.name = "Fred Jones";
TEST(1, correct, order);
// Replace all the hobbies for the only customer in the order
order =
<order>
<customer>
<name>John Smith</name>
<hobby>Biking</hobby>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
</order>;
correct =
<order>
<customer>
<name>John Smith</name>
<hobby>shopping</hobby>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
</order>;
order.customer.hobby = "shopping"
TEST(2, correct, order);
// Attempt to set the sale date of the item. Throw an exception if more than 1 item exists.
order =
<order>
<customer>
<name>John Smith</name>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
<saledate>01-05-2002</saledate>
</item>
</order>;
correct =
<order>
<customer>
<name>John Smith</name>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
<saledate>05-07-2002</saledate>
</item>
</order>;
order.item.saledate = "05-07-2002"
TEST(3, correct, order);
order =
<order>
<customer>
<name>John Smith</name>
<hobby>Biking</hobby>
</customer>
<item id="1">
<description>Big Screen Television</description>
<price>1299.99</price>
</item>
<item id="2">
<description>DVD Player</description>
<price>399.99</price>
</item>
</order>;
try {
order.item.saledate = "05-07-2002";
SHOULD_THROW(4);
} catch (ex) {
TEST(4, "TypeError", ex.name);
}
// Replace all the employee's hobbies with their new favorite pastime
emps =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
<hobby>skiing</hobby>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
<hobby>running</hobby>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
<hobby>Biking</hobby>
</employee>
</employees>;
correct =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
<hobby>skiing</hobby>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
<hobby>running</hobby>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
<hobby>working</hobby>
</employee>
</employees>;
emps.employee.(@id == 3).hobby = "working";
TEST(5, correct, emps);
// Replace the first employee with George
emps =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
</employees>;
correct =
<employees>
<employee id = "4">
<name>George</name>
<age>27</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
</employees>;
emps.employee[0] = <employee id="4"><name>George</name><age>27</age></employee>;
TEST(6, emps, correct);
// Add a new employee to the end of the employee list
emps =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
</employees>;
correct =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
<employee id="4">
<name>Frank</name>
<age>39</age>
</employee>
</employees>;
emps.employee += <employee id="4"><name>Frank</name><age>39</age></employee>;
TEST(7, correct, emps);
// Add a new employee to the end of the employee list
emps =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
</employees>;
correct =
<employees>
<employee id = "1">
<name>John</name>
<age>20</age>
</employee>
<employee id = "2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id = "3">
<name>Ted</name>
<age>35</age>
</employee>
<employee id="4">
<name>Frank</name>
<age>39</age>
</employee>
</employees>;
emps.employee[emps.employee.length()] = <employee id="4"><name>Frank</name><age>39</age></employee>;
TEST(7, correct, emps);
END();

View File

@ -1,83 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("11.6.3 - Compound Assignment");
// Insert employee 3 and 4 after the first employee
e =
<employees>
<employee id="1">
<name>Joe</name>
<age>20</age>
</employee>
<employee id="2">
<name>Sue</name>
<age>30</age>
</employee>
</employees>;
correct =
<employees>
<employee id="1">
<name>Joe</name>
<age>20</age>
</employee>
<employee id="3">
<name>Fred</name>
</employee>
<employee id="4">
<name>Carol</name>
</employee>
<employee id="2">
<name>Sue</name>
<age>30</age>
</employee>
</employees>;
e.employee[0] += <employee id="3"><name>Fred</name></employee> +
<employee id="4"><name>Carol</name></employee>;
TEST(1, correct, e);
// Append employees 3 and 4 to the end of the employee list
e =
<employees>
<employee id="1">
<name>Joe</name>
<age>20</age>
</employee>
<employee id="2">
<name>Sue</name>
<age>30</age>
</employee>
</employees>;
correct =
<employees>
<employee id="1">
<name>Joe</name>
<age>20</age>
</employee>
<employee id="2">
<name>Sue</name>
<age>30</age>
</employee>
<employee id="3">
<name>Fred</name>
</employee>
<employee id="4">
<name>Carol</name>
</employee>
</employees>;
e.employee[1] += <employee id="3"><name>Fred</name></employee> +
<employee id="4"><name>Carol</name></employee>;
TEST(2, correct, e);
END();

View File

@ -1,23 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.1 - Attribute Identifiers Do not crash when " +
"attribute-op name collides with local var";
var BUGNUMBER = 301545;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
function TOCParser(aElement) {
var href = aElement.@href;
}
TEST(summary, expect, actual);
END();

View File

@ -1,33 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
* Contributor: Blake Kaplan
*/
var summary = "E4X QuoteString should deal with empty string";
var BUGNUMBER = 302531;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
function f(e) {
return <e {e}="" />;
}
XML.ignoreWhitespace = true;
XML.prettyPrinting = true;
expect = (
<e foo="" />
).toXMLString().replace(/</g, '&lt;');
actual = f('foo').toXMLString().replace(/</g, '&lt;');
TEST(1, expect, actual);
END();

View File

@ -1,29 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 340024;
var summary = '11.1.4 - XML Initializer';
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
expect = '<tag b="c" d="e"/>';
try
{
actual = (<tag {0?"a":"b"}="c" d="e"/>.toXMLString());
}
catch(E)
{
actual = E + '';
}
TEST(1, expect, actual);
END();

View File

@ -1,35 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 366123;
var summary = 'Compiling long XML filtering predicate';
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
function exploit() {
var code = "foo = <x/>.(", obj = {};
for(var i = 0; i < 0x10000; i++) {
code += "0, ";
}
code += "0);";
Function(code);
}
try
{
exploit();
}
catch(ex)
{
}
TEST(1, expect, actual);
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// See https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X#section_7
var summary = 'simple filter';
var BUGNUMBER = 496113;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
var people = <people>
<person>
<name>Joe</name>
</person>
</people>;
expect = <person><name>Joe</name></person>.toXMLString();
print(actual = people.person.(name == "Joe").toXMLString());
TEST(1, expect, actual);
END();

View File

@ -1,26 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip-if(Android)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'Uncontrolled recursion in js_MarkXML during GC';
var BUGNUMBER = 280844;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var N = 5 * 1000;
var x = <x/>;
for (var i = 1; i <= N; ++i) {
x.appendChild(<x/>);
x = x.x[0];
}
printStatus(x.toXMLString());
gc();
TEST(1, expect, actual);
END();

View File

@ -1,38 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip-if(Android)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'Uncontrolled recursion in js_MarkXML during GC';
var BUGNUMBER = 280844;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var N = 100 * 1000;
function prepare_list(N)
{
var head = {};
var cursor = head;
for (var i = 0; i != N; ++i) {
var ns = new Namespace();
var x = <xml/>;
x.addNamespace(ns);
cursor.next = x;
cursor = ns;
}
return head;
}
var head = prepare_list(N);
gc();
TEST(1, expect, actual);
END();

View File

@ -1,47 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip-if(!xulRuntime.shell) -- does not always dismiss alert
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Regress - Do not crash on gc";
var BUGNUMBER = 292455;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
function output (text)
{
if (typeof alert != 'undefined')
{
alert(text);
}
else if (typeof print != 'undefined')
{
print(text);
}
}
function doTest ()
{
var html = <div xml:lang="en">
<h1>Kibology for all</h1>
<p>Kibology for all. All for Kibology. </p>
</div>;
// insert new child as last child
html.* += <h1>All for Kibology</h1>;
gc();
output(html);
html.* += <p>All for Kibology. Kibology for all.</p>;
gc();
output(html);
}
doTest();
TEST(1, expect, actual);
END();

View File

@ -1,36 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "13.3.5.2 - root QName.uri";
var BUGNUMBER = 313952;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
printStatus("This test requires TOO_MUCH_GC");
var str = " foo:bar".substring(1);
expect = new QName(" foo:bar".substring(2), "a").uri;
var likeString = {
toString: function() {
var tmp = str;
str = null;
return tmp;
}
};
actual = new QName(likeString, "a").uri;
printStatus(actual.length);
printStatus(expect === actual);
TEST(1, expect, actual);
END();

View File

@ -1,45 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "13.3.5.2 - root QName.uri";
var BUGNUMBER = 313952;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
var str = String(1);
var expected = String(1);
var x = new XML("text");
x.function::toString = function() {
var tmp = str;
str = null;
return tmp;
}
var TWO = 2.0;
var likeString = {
toString: function() {
var tmp = new XML("");
tmp = (tmp == "string");
if (typeof gc == "function")
gc();
for (var i = 0; i != 40000; ++i) {
tmp = 1e100 * TWO;
tmp = null;
}
return expected;
}
}
TEST(1, true, x != likeString);
END();

View File

@ -1,66 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "GC hazard during namespace scanning";
var BUGNUMBER = 324117;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
function prepare(N)
{
var xml = <xml/>;
var ns1 = new Namespace("text1");
var ns2 = new Namespace("text2");
xml.addNamespace(ns1);
xml.addNamespace(ns2);
// Prepare list to trigger DeutschSchorrWaite call during GC
cursor = xml;
for (var i = 0; i != N; ++i) {
if (i % 2 == 0)
cursor = [ {a: 1}, cursor ];
else
cursor = [ cursor, {a: 1} ];
}
return cursor;
}
function check(list, N)
{
// Extract xml to verify
for (var i = N; i != 0; --i) {
list = list[i % 2];
}
var xml = list;
if (typeof xml != "xml")
return false;
var array = xml.inScopeNamespaces();
if (array.length !== 3)
return false;
if (array[0].uri !== "")
return false;
if (array[1].uri !== "text1")
return false;
if (array[2].uri !== "text2")
return false;
return true;
}
var N = 64000;
var list = prepare(N);
gc();
var ok = check(list, N);
printStatus(ok);
TEST(1, expect, actual);
END();

View File

@ -1,54 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip -- slow
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 324278;
var summary = 'GC without recursion';
var actual;
var expect;
printBugNumber(BUGNUMBER);
START(summary);
var N = 1000 * 1000;
print("N = " + N);
function prepare_list(N)
{
var cursor = null;
for (var i = 0; i != N; ++i) {
var ns = new Namespace("protocol:address");
ns.property = cursor;
var xml = <xml/>;
xml.addNamespace(ns);
cursor = {xml: xml};
}
return cursor;
}
print("preparing...");
var list = prepare_list(N);
print("prepared for "+N);
gc();
var count = 0;
while (list && list.xml.inScopeNamespaces().length > 0 && list.xml.inScopeNamespaces()[1]) {
list = list.xml.inScopeNamespaces()[1].property;
++count;
}
expect = N;
actual = count;
TEST(1, expect, actual);
gc();
END();

View File

@ -1,60 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "scanner: memory exposure to scripts";
var BUGNUMBER = 339785;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
function evalXML(N)
{
var str = Array(N + 1).join('a'); // str is string of N a
src = "var x = <xml>&"+str+";</xml>;";
try {
eval(src);
return "Should have thrown unknown entity error";
} catch (e) {
return e.message;
}
return "Unexpected";
}
var N1 = 1;
var must_be_good = evalXML(N1);
expect = 'unknown XML entity a';
actual = must_be_good;
TEST(1, expect, actual);
function testScanner()
{
for (var power = 2; power != 15; ++power) {
var N2 = (1 << power) - 2;
var can_be_bad = evalXML(N2);
var diff = can_be_bad.length - must_be_good.length;
if (diff != 0 && diff != N2 - N1) {
return "Detected memory exposure at entity length of "+(N2+2);
}
}
return "Ok";
}
expect = "Ok";
// repeat test since test does not always fail
for (var iTestScanner = 0; iTestScanner < 100; ++iTestScanner)
{
actual = testScanner();
TEST(iTestScanner+1, expect, actual);
}
END();

View File

@ -1,41 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 357063;
var summary = 'GC hazard in XMLEquality';
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var xml = new XML("<xml><a>text</a><a>text</a></xml>");
var xml2 = new XML("<xml><a>text</a><a>text</a></xml>");
var list1 = xml.a;
var list2 = xml2.a;
XML.prototype.function::toString = function() {
if (xml2) {
delete list2[1];
delete list2[0];
xml2 = null;
gc();
}
return "text";
}
var value = list1 == list2;
print('list1: ' + list1.toXMLString());
print('list2: ' + list2.toXMLString());
print('list1 == list2: ' + value);
TEST(1, expect, actual);
END();

View File

@ -1,37 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 357063;
var summary = 'GC hazard in XMLEquality';
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var xml1 = new XML("<xml>text<a>B</a></xml>");
var xml2 = new XML("<xml>text<a>C</a></xml>");
XML.prototype.function::toString = function() {
if (xml2) {
delete xml2.*;
xml2 = null;
gc();
}
return "text";
}
print('xml1: ' + xml1);
print('xml2: ' + xml2);
if (xml1 == xml2)
throw "unexpected result";
TEST(1, expect, actual);
END();

View File

@ -1,524 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) fails
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.1.2.1 - isXMLName()");
var BUGNUMBER = 289630;
printBugNumber(BUGNUMBER);
TEST(1, true, typeof isXMLName == "function");
// Check converting to string
var object = { toString: function() { return "text"; } };
TEST(2, true, isXMLName(object));
// This throws TypeError => isXMLName should give false
var object2 = { toString: function() { return this; } };
TEST(3, false, isXMLName(object2));
// Check indirect throw of TypeError
var object3 = { toString: function() { return String(object2); } };
TEST(3, false, isXMLName(object3));
var object4 = { toString: function() { throw 1; } };
try {
isXMLName(object4);
SHOULD_THROW(4);
} catch (e) {
TEST(4, 1, e);
}
// Check various cases of http://w3.org/TR/xml-names11/#NT-NCName
TEST(5, false, isXMLName(""));
var START = 0x1;
var OTHER = 0x2;
var chars = init();
var marker;
// Letter
// Letter::= BaseChar | Ideographic
marker = START | OTHER;
// BaseChar
markRange(chars, 0x0041, 0x005A, marker);
markRange(chars, 0x0061, 0x007A, marker);
markRange(chars, 0x00C0, 0x00D6, marker);
markRange(chars, 0x00D8, 0x00F6, marker);
markRange(chars, 0x00F8, 0x00FF, marker);
markRange(chars, 0x0100, 0x0131, marker);
markRange(chars, 0x0134, 0x013E, marker);
markRange(chars, 0x0141, 0x0148, marker);
markRange(chars, 0x014A, 0x017E, marker);
markRange(chars, 0x0180, 0x01C3, marker);
markRange(chars, 0x01CD, 0x01F0, marker);
markRange(chars, 0x01F4, 0x01F5, marker);
markRange(chars, 0x01FA, 0x0217, marker);
markRange(chars, 0x0250, 0x02A8, marker);
markRange(chars, 0x02BB, 0x02C1, marker);
markRange(chars, 0x0386, 0x0386, marker);
markRange(chars, 0x0388, 0x038A, marker);
markRange(chars, 0x038C, 0x038C, marker);
markRange(chars, 0x038E, 0x03A1, marker);
markRange(chars, 0x03A3, 0x03CE, marker);
markRange(chars, 0x03D0, 0x03D6, marker);
markRange(chars, 0x03DA, 0x03DA, marker);
markRange(chars, 0x03DC, 0x03DC, marker);
markRange(chars, 0x03DE, 0x03DE, marker);
markRange(chars, 0x03E0, 0x03E0, marker);
markRange(chars, 0x03E2, 0x03F3, marker);
markRange(chars, 0x0401, 0x040C, marker);
markRange(chars, 0x040E, 0x044F, marker);
markRange(chars, 0x0451, 0x045C, marker);
markRange(chars, 0x045E, 0x0481, marker);
markRange(chars, 0x0490, 0x04C4, marker);
markRange(chars, 0x04C7, 0x04C8, marker);
markRange(chars, 0x04CB, 0x04CC, marker);
markRange(chars, 0x04D0, 0x04EB, marker);
markRange(chars, 0x04EE, 0x04F5, marker);
markRange(chars, 0x04F8, 0x04F9, marker);
markRange(chars, 0x0531, 0x0556, marker);
markRange(chars, 0x0559, 0x0559, marker);
markRange(chars, 0x0561, 0x0586, marker);
markRange(chars, 0x05D0, 0x05EA, marker);
markRange(chars, 0x05F0, 0x05F2, marker);
markRange(chars, 0x0621, 0x063A, marker);
markRange(chars, 0x0641, 0x064A, marker);
markRange(chars, 0x0671, 0x06B7, marker);
markRange(chars, 0x06BA, 0x06BE, marker);
markRange(chars, 0x06C0, 0x06CE, marker);
markRange(chars, 0x06D0, 0x06D3, marker);
markRange(chars, 0x06D5, 0x06D5, marker);
markRange(chars, 0x06E5, 0x06E6, marker);
markRange(chars, 0x0905, 0x0939, marker);
markRange(chars, 0x093D, 0x093D, marker);
markRange(chars, 0x0958, 0x0961, marker);
markRange(chars, 0x0985, 0x098C, marker);
markRange(chars, 0x098F, 0x0990, marker);
markRange(chars, 0x0993, 0x09A8, marker);
markRange(chars, 0x09AA, 0x09B0, marker);
markRange(chars, 0x09B2, 0x09B2, marker);
markRange(chars, 0x09B6, 0x09B9, marker);
markRange(chars, 0x09DC, 0x09DD, marker);
markRange(chars, 0x09DF, 0x09E1, marker);
markRange(chars, 0x09F0, 0x09F1, marker);
markRange(chars, 0x0A05, 0x0A0A, marker);
markRange(chars, 0x0A0F, 0x0A10, marker);
markRange(chars, 0x0A13, 0x0A28, marker);
markRange(chars, 0x0A2A, 0x0A30, marker);
markRange(chars, 0x0A32, 0x0A33, marker);
markRange(chars, 0x0A35, 0x0A36, marker);
markRange(chars, 0x0A38, 0x0A39, marker);
markRange(chars, 0x0A59, 0x0A5C, marker);
markRange(chars, 0x0A5E, 0x0A5E, marker);
markRange(chars, 0x0A72, 0x0A74, marker);
markRange(chars, 0x0A85, 0x0A8B, marker);
markRange(chars, 0x0A8D, 0x0A8D, marker);
markRange(chars, 0x0A8F, 0x0A91, marker);
markRange(chars, 0x0A93, 0x0AA8, marker);
markRange(chars, 0x0AAA, 0x0AB0, marker);
markRange(chars, 0x0AB2, 0x0AB3, marker);
markRange(chars, 0x0AB5, 0x0AB9, marker);
markRange(chars, 0x0ABD, 0x0ABD, marker);
markRange(chars, 0x0AE0, 0x0AE0, marker);
markRange(chars, 0x0B05, 0x0B0C, marker);
markRange(chars, 0x0B0F, 0x0B10, marker);
markRange(chars, 0x0B13, 0x0B28, marker);
markRange(chars, 0x0B2A, 0x0B30, marker);
markRange(chars, 0x0B32, 0x0B33, marker);
markRange(chars, 0x0B36, 0x0B39, marker);
markRange(chars, 0x0B3D, 0x0B3D, marker);
markRange(chars, 0x0B5C, 0x0B5D, marker);
markRange(chars, 0x0B5F, 0x0B61, marker);
markRange(chars, 0x0B85, 0x0B8A, marker);
markRange(chars, 0x0B8E, 0x0B90, marker);
markRange(chars, 0x0B92, 0x0B95, marker);
markRange(chars, 0x0B99, 0x0B9A, marker);
markRange(chars, 0x0B9C, 0x0B9C, marker);
markRange(chars, 0x0B9E, 0x0B9F, marker);
markRange(chars, 0x0BA3, 0x0BA4, marker);
markRange(chars, 0x0BA8, 0x0BAA, marker);
markRange(chars, 0x0BAE, 0x0BB5, marker);
markRange(chars, 0x0BB7, 0x0BB9, marker);
markRange(chars, 0x0C05, 0x0C0C, marker);
markRange(chars, 0x0C0E, 0x0C10, marker);
markRange(chars, 0x0C12, 0x0C28, marker);
markRange(chars, 0x0C2A, 0x0C33, marker);
markRange(chars, 0x0C35, 0x0C39, marker);
markRange(chars, 0x0C60, 0x0C61, marker);
markRange(chars, 0x0C85, 0x0C8C, marker);
markRange(chars, 0x0C8E, 0x0C90, marker);
markRange(chars, 0x0C92, 0x0CA8, marker);
markRange(chars, 0x0CAA, 0x0CB3, marker);
markRange(chars, 0x0CB5, 0x0CB9, marker);
markRange(chars, 0x0CDE, 0x0CDE, marker);
markRange(chars, 0x0CE0, 0x0CE1, marker);
markRange(chars, 0x0D05, 0x0D0C, marker);
markRange(chars, 0x0D0E, 0x0D10, marker);
markRange(chars, 0x0D12, 0x0D28, marker);
markRange(chars, 0x0D2A, 0x0D39, marker);
markRange(chars, 0x0D60, 0x0D61, marker);
markRange(chars, 0x0E01, 0x0E2E, marker);
markRange(chars, 0x0E30, 0x0E30, marker);
markRange(chars, 0x0E32, 0x0E33, marker);
markRange(chars, 0x0E40, 0x0E45, marker);
markRange(chars, 0x0E81, 0x0E82, marker);
markRange(chars, 0x0E84, 0x0E84, marker);
markRange(chars, 0x0E87, 0x0E88, marker);
markRange(chars, 0x0E8A, 0x0E8A, marker);
markRange(chars, 0x0E8D, 0x0E8D, marker);
markRange(chars, 0x0E94, 0x0E97, marker);
markRange(chars, 0x0E99, 0x0E9F, marker);
markRange(chars, 0x0EA1, 0x0EA3, marker);
markRange(chars, 0x0EA5, 0x0EA5, marker);
markRange(chars, 0x0EA7, 0x0EA7, marker);
markRange(chars, 0x0EAA, 0x0EAB, marker);
markRange(chars, 0x0EAD, 0x0EAE, marker);
markRange(chars, 0x0EB0, 0x0EB0, marker);
markRange(chars, 0x0EB2, 0x0EB3, marker);
markRange(chars, 0x0EBD, 0x0EBD, marker);
markRange(chars, 0x0EC0, 0x0EC4, marker);
markRange(chars, 0x0F40, 0x0F47, marker);
markRange(chars, 0x0F49, 0x0F69, marker);
markRange(chars, 0x10A0, 0x10C5, marker);
markRange(chars, 0x10D0, 0x10F6, marker);
markRange(chars, 0x1100, 0x1100, marker);
markRange(chars, 0x1102, 0x1103, marker);
markRange(chars, 0x1105, 0x1107, marker);
markRange(chars, 0x1109, 0x1109, marker);
markRange(chars, 0x110B, 0x110C, marker);
markRange(chars, 0x110E, 0x1112, marker);
markRange(chars, 0x113C, 0x113C, marker);
markRange(chars, 0x113E, 0x113E, marker);
markRange(chars, 0x1140, 0x1140, marker);
markRange(chars, 0x114C, 0x114C, marker);
markRange(chars, 0x114E, 0x114E, marker);
markRange(chars, 0x1150, 0x1150, marker);
markRange(chars, 0x1154, 0x1155, marker);
markRange(chars, 0x1159, 0x1159, marker);
markRange(chars, 0x115F, 0x1161, marker);
markRange(chars, 0x1163, 0x1163, marker);
markRange(chars, 0x1165, 0x1165, marker);
markRange(chars, 0x1167, 0x1167, marker);
markRange(chars, 0x1169, 0x1169, marker);
markRange(chars, 0x116D, 0x116E, marker);
markRange(chars, 0x1172, 0x1173, marker);
markRange(chars, 0x1175, 0x1175, marker);
markRange(chars, 0x119E, 0x119E, marker);
markRange(chars, 0x11A8, 0x11A8, marker);
markRange(chars, 0x11AB, 0x11AB, marker);
markRange(chars, 0x11AE, 0x11AF, marker);
markRange(chars, 0x11B7, 0x11B8, marker);
markRange(chars, 0x11BA, 0x11BA, marker);
markRange(chars, 0x11BC, 0x11C2, marker);
markRange(chars, 0x11EB, 0x11EB, marker);
markRange(chars, 0x11F0, 0x11F0, marker);
markRange(chars, 0x11F9, 0x11F9, marker);
markRange(chars, 0x1E00, 0x1E9B, marker);
markRange(chars, 0x1EA0, 0x1EF9, marker);
markRange(chars, 0x1F00, 0x1F15, marker);
markRange(chars, 0x1F18, 0x1F1D, marker);
markRange(chars, 0x1F20, 0x1F45, marker);
markRange(chars, 0x1F48, 0x1F4D, marker);
markRange(chars, 0x1F50, 0x1F57, marker);
markRange(chars, 0x1F59, 0x1F59, marker);
markRange(chars, 0x1F5B, 0x1F5B, marker);
markRange(chars, 0x1F5D, 0x1F5D, marker);
markRange(chars, 0x1F5F, 0x1F7D, marker);
markRange(chars, 0x1F80, 0x1FB4, marker);
markRange(chars, 0x1FB6, 0x1FBC, marker);
markRange(chars, 0x1FBE, 0x1FBE, marker);
markRange(chars, 0x1FC2, 0x1FC4, marker);
markRange(chars, 0x1FC6, 0x1FCC, marker);
markRange(chars, 0x1FD0, 0x1FD3, marker);
markRange(chars, 0x1FD6, 0x1FDB, marker);
markRange(chars, 0x1FE0, 0x1FEC, marker);
markRange(chars, 0x1FF2, 0x1FF4, marker);
markRange(chars, 0x1FF6, 0x1FFC, marker);
markRange(chars, 0x2126, 0x2126, marker);
markRange(chars, 0x212A, 0x212B, marker);
markRange(chars, 0x212E, 0x212E, marker);
markRange(chars, 0x2180, 0x2182, marker);
markRange(chars, 0x3041, 0x3094, marker);
markRange(chars, 0x30A1, 0x30FA, marker);
markRange(chars, 0x3105, 0x312C, marker);
markRange(chars, 0xAC00, 0xD7A3, marker);
// Ideographic
markRange(chars, 0x4E00, 0x9FA5, marker);
markRange(chars, 0x3007, 0x3007, marker);
markRange(chars, 0x3021, 0x3029, marker);
// Digit
marker = OTHER;
markRange(chars, 0x0030, 0x0039, marker);
markRange(chars, 0x0660, 0x0669, marker);
markRange(chars, 0x06F0, 0x06F9, marker);
markRange(chars, 0x0966, 0x096F, marker);
markRange(chars, 0x09E6, 0x09EF, marker);
markRange(chars, 0x0A66, 0x0A6F, marker);
markRange(chars, 0x0AE6, 0x0AEF, marker);
markRange(chars, 0x0B66, 0x0B6F, marker);
markRange(chars, 0x0BE7, 0x0BEF, marker);
markRange(chars, 0x0C66, 0x0C6F, marker);
markRange(chars, 0x0CE6, 0x0CEF, marker);
markRange(chars, 0x0D66, 0x0D6F, marker);
markRange(chars, 0x0E50, 0x0E59, marker);
markRange(chars, 0x0ED0, 0x0ED9, marker);
markRange(chars, 0x0F20, 0x0F29, marker);
// "Other NameChars"
markRange(chars, 0x2e, 0x2e, marker);
markRange(chars, 0x2d, 0x2d, marker);
marker = START | OTHER;
markRange(chars, 0x5f, 0x5f, marker);
// e4x excludes ':'
// CombiningChar
marker = OTHER;
markRange(chars, 0x0300, 0x0345, marker);
markRange(chars, 0x0360, 0x0361, marker);
markRange(chars, 0x0483, 0x0486, marker);
markRange(chars, 0x0591, 0x05A1, marker);
markRange(chars, 0x05A3, 0x05B9, marker);
markRange(chars, 0x05BB, 0x05BD, marker);
markRange(chars, 0x05BF, 0x05BF, marker);
markRange(chars, 0x05C1, 0x05C2, marker);
markRange(chars, 0x05C4, 0x05C4, marker);
markRange(chars, 0x064B, 0x0652, marker);
markRange(chars, 0x0670, 0x0670, marker);
markRange(chars, 0x06D6, 0x06DC, marker);
markRange(chars, 0x06DD, 0x06DF, marker);
markRange(chars, 0x06E0, 0x06E4, marker);
markRange(chars, 0x06E7, 0x06E8, marker);
markRange(chars, 0x06EA, 0x06ED, marker);
markRange(chars, 0x0901, 0x0903, marker);
markRange(chars, 0x093C, 0x093C, marker);
markRange(chars, 0x093E, 0x094C, marker);
markRange(chars, 0x094D, 0x094D, marker);
markRange(chars, 0x0951, 0x0954, marker);
markRange(chars, 0x0962, 0x0963, marker);
markRange(chars, 0x0981, 0x0983, marker);
markRange(chars, 0x09BC, 0x09BC, marker);
markRange(chars, 0x09BE, 0x09BE, marker);
markRange(chars, 0x09BF, 0x09BF, marker);
markRange(chars, 0x09C0, 0x09C4, marker);
markRange(chars, 0x09C7, 0x09C8, marker);
markRange(chars, 0x09CB, 0x09CD, marker);
markRange(chars, 0x09D7, 0x09D7, marker);
markRange(chars, 0x09E2, 0x09E3, marker);
markRange(chars, 0x0A02, 0x0A02, marker);
markRange(chars, 0x0A3C, 0x0A3C, marker);
markRange(chars, 0x0A3E, 0x0A3E, marker);
markRange(chars, 0x0A3F, 0x0A3F, marker);
markRange(chars, 0x0A40, 0x0A42, marker);
markRange(chars, 0x0A47, 0x0A48, marker);
markRange(chars, 0x0A4B, 0x0A4D, marker);
markRange(chars, 0x0A70, 0x0A71, marker);
markRange(chars, 0x0A81, 0x0A83, marker);
markRange(chars, 0x0ABC, 0x0ABC, marker);
markRange(chars, 0x0ABE, 0x0AC5, marker);
markRange(chars, 0x0AC7, 0x0AC9, marker);
markRange(chars, 0x0ACB, 0x0ACD, marker);
markRange(chars, 0x0B01, 0x0B03, marker);
markRange(chars, 0x0B3C, 0x0B3C, marker);
markRange(chars, 0x0B3E, 0x0B43, marker);
markRange(chars, 0x0B47, 0x0B48, marker);
markRange(chars, 0x0B4B, 0x0B4D, marker);
markRange(chars, 0x0B56, 0x0B57, marker);
markRange(chars, 0x0B82, 0x0B83, marker);
markRange(chars, 0x0BBE, 0x0BC2, marker);
markRange(chars, 0x0BC6, 0x0BC8, marker);
markRange(chars, 0x0BCA, 0x0BCD, marker);
markRange(chars, 0x0BD7, 0x0BD7, marker);
markRange(chars, 0x0C01, 0x0C03, marker);
markRange(chars, 0x0C3E, 0x0C44, marker);
markRange(chars, 0x0C46, 0x0C48, marker);
markRange(chars, 0x0C4A, 0x0C4D, marker);
markRange(chars, 0x0C55, 0x0C56, marker);
markRange(chars, 0x0C82, 0x0C83, marker);
markRange(chars, 0x0CBE, 0x0CC4, marker);
markRange(chars, 0x0CC6, 0x0CC8, marker);
markRange(chars, 0x0CCA, 0x0CCD, marker);
markRange(chars, 0x0CD5, 0x0CD6, marker);
markRange(chars, 0x0D02, 0x0D03, marker);
markRange(chars, 0x0D3E, 0x0D43, marker);
markRange(chars, 0x0D46, 0x0D48, marker);
markRange(chars, 0x0D4A, 0x0D4D, marker);
markRange(chars, 0x0D57, 0x0D57, marker);
markRange(chars, 0x0E31, 0x0E31, marker);
markRange(chars, 0x0E34, 0x0E3A, marker);
markRange(chars, 0x0E47, 0x0E4E, marker);
markRange(chars, 0x0EB1, 0x0EB1, marker);
markRange(chars, 0x0EB4, 0x0EB9, marker);
markRange(chars, 0x0EBB, 0x0EBC, marker);
markRange(chars, 0x0EC8, 0x0ECD, marker);
markRange(chars, 0x0F18, 0x0F19, marker);
markRange(chars, 0x0F35, 0x0F35, marker);
markRange(chars, 0x0F37, 0x0F37, marker);
markRange(chars, 0x0F39, 0x0F39, marker);
markRange(chars, 0x0F3E, 0x0F3E, marker);
markRange(chars, 0x0F3F, 0x0F3F, marker);
markRange(chars, 0x0F71, 0x0F84, marker);
markRange(chars, 0x0F86, 0x0F8B, marker);
markRange(chars, 0x0F90, 0x0F95, marker);
markRange(chars, 0x0F97, 0x0F97, marker);
markRange(chars, 0x0F99, 0x0FAD, marker);
markRange(chars, 0x0FB1, 0x0FB7, marker);
markRange(chars, 0x0FB9, 0x0FB9, marker);
markRange(chars, 0x20D0, 0x20DC, marker);
markRange(chars, 0x20E1, 0x20E1, marker);
markRange(chars, 0x302A, 0x302F, marker);
markRange(chars, 0x3099, 0x3099, marker);
markRange(chars, 0x309A, 0x309A, marker);
// Extender
markRange(chars, 0x00B7, 0x00B7, marker);
markRange(chars, 0x02D0, 0x02D0, marker);
markRange(chars, 0x02D1, 0x02D1, marker);
markRange(chars, 0x0387, 0x0387, marker);
markRange(chars, 0x0640, 0x0640, marker);
markRange(chars, 0x0E46, 0x0E46, marker);
markRange(chars, 0x0EC6, 0x0EC6, marker);
markRange(chars, 0x3005, 0x3005, marker);
markRange(chars, 0x3031, 0x3035, marker);
markRange(chars, 0x309D, 0x309E, marker);
markRange(chars, 0x30FC, 0x30FE, marker);
TEST(6, '', testIsXMLName(chars));
END();
// Utilities
function markRange(buffer, start, end, marker)
{
for (var i = start; i <= end; i++)
{
buffer[i] |= marker;
}
}
function init()
{
var length = 0xFFFF + 1;
var chars = new Array(length);
for (var i = 0; i < length; i++)
{
chars[i] = 0;
}
return chars;
}
function testIsXMLName(buffer)
{
var nl = "\n";
var result = '';
var length = buffer.length;
var rangestart = null;
var rangeend = null;
var rangemessage = '';
for (var i = 0; i < length; i++)
{
var message = '';
var c = String.fromCharCode(i);
var marker = buffer[i];
var namestart = isXMLName(c + 'x');
var nameother = isXMLName('x' + c);
if (marker == 0 && namestart)
{
message += ': Invalid char accepted as start ';
}
if (marker == 0 && nameother)
{
message += ': Invalid Char accepted as other ';
}
if ((marker & START) && !namestart)
{
message += ': Start char not accepted';
}
if ((marker & OTHER) && !nameother)
{
message += ': Other char not accepted';
}
if (rangemessage && !message)
{
// no current error, previous error
// output previous error range
result += rangestart + '-' + rangeend + ' ' +
rangemessage + nl;
rangemessage = rangestart = rangeend = null;
}
else if (!rangemessage && message)
{
// current error, no previous error
// start new error range
rangemessage = message;
rangestart = rangeend = formatChar(c);
}
else if (rangemessage && message)
{
if (rangemessage == message)
{
// current error same as previous
// continue previous error range
rangeend = formatChar(c);
}
else
{
// different error, output range
result += rangestart + '-' + rangeend + ' ' +
rangemessage + nl;
rangemessage = message;
rangestart = rangeend = formatChar(c);
}
}
}
if (rangemessage)
{
result += rangestart + '-' + rangeend + ' ' +
rangemessage + nl;
}
return result;
}
function formatChar(c)
{
var s = '0x' + c.charCodeAt(0).toString(16).toUpperCase();
return s;
}

View File

@ -1,32 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.2.1 - Namespace Constructor as Function");
n = Namespace();
m = new Namespace();
TEST(1, typeof(m), typeof(n));
TEST(2, m.prefix, n.prefix);
TEST(3, m.uri, n.uri);
n = Namespace("http://foobar/");
m = new Namespace("http://foobar/");
TEST(4, typeof(m), typeof(n));
TEST(5, m.prefix, n.prefix);
TEST(6, m.uri, n.uri);
n = Namespace("foobar", "http://foobar/");
m = new Namespace("foobar", "http://foobar/");
TEST(7, typeof(m), typeof(n));
TEST(8, m.prefix, n.prefix);
TEST(9, m.uri, n.uri);
n = Namespace(m);
TEST(10, m, n);
END();

View File

@ -1,50 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.2.2 - Namespace Constructor");
n = new Namespace();
TEST(1, "object", typeof(n));
TEST(2, "", n.prefix);
TEST(3, "", n.uri);
n = new Namespace("");
TEST(4, "object", typeof(n));
TEST(5, "", n.prefix);
TEST(6, "", n.uri);
n = new Namespace("http://foobar/");
TEST(7, "object", typeof(n));
TEST(8, "undefined", typeof(n.prefix));
TEST(9, "http://foobar/", n.uri);
// Check if the undefined prefix is getting set properly
m = new Namespace(n);
TEST(10, typeof(n), typeof(m));
TEST(11, n.prefix, m.prefix);
TEST(12, n.uri, m.uri);
n = new Namespace("foobar", "http://foobar/");
TEST(13, "object", typeof(n));
TEST(14, "foobar", n.prefix);
TEST(15, "http://foobar/", n.uri);
// Check if all the properties are getting copied
m = new Namespace(n);
TEST(16, typeof(n), typeof(m));
TEST(17, n.prefix, m.prefix);
TEST(18, n.uri, m.uri);
try {
n = new Namespace("ns", "");
SHOULD_THROW(19);
} catch(ex) {
TEST(19, "TypeError", ex.name);
}
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.2.5 - Properties of Namespace Instances");
n = new Namespace("ns", "http://someuri");
TEST(1, true, n.hasOwnProperty("prefix"));
TEST(2, true, n.hasOwnProperty("uri"));
TEST(3, true, n.propertyIsEnumerable("prefix"));
TEST(4, true, n.propertyIsEnumerable("uri"));
var prefixCount = 0;
var uriCount = 0;
var p;
for(p in n)
{
if(p == "prefix") prefixCount++;
if(p == "uri") uriCount++;
}
TEST(5, 1, prefixCount);
TEST(6, 1, uriCount);
TEST(7, "ns", n.prefix);
TEST(8, "http://someuri", n.uri);
END();

View File

@ -1,32 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'throw error when two attributes with the same local name and ' +
'the same namespace';
var BUGNUMBER = 283972;
var actual = 'no error';
var expect = 'error';
printBugNumber(BUGNUMBER);
START(summary);
try
{
var xml = <god xmlns:pf1="http://example.com/2005/02/pf1"
xmlns:pf2="http://example.com/2005/02/pf1"
pf1:name="Kibo"
pf2:name="Xibo" />;
printStatus(xml.toXMLString());
}
catch(e)
{
actual = 'error';
}
TEST(1, expect, actual);
END();

View File

@ -1,30 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) fails
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Undeclaring namespace prefix should cause parse error";
var BUGNUMBER = 292863;
var actual = 'no error';
var expect = 'error';
printBugNumber(BUGNUMBER);
START(summary);
try
{
var godList = <gods:gods xmlns:gods="http://example.com/2005/05/04/gods">
<god xmlns:god="">Kibo</god>
</gods:gods>;
printStatus(godList.toXMLString());
}
catch(e)
{
actual = 'error';
}
TEST(1, expect, actual);
END();

View File

@ -1,42 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 350442;
var summary = 'toXMLString with namespace definitions';
var actual, expect;
printBugNumber(BUGNUMBER);
START(summary);
expect = false;
actual = false;
try
{
var t1 = <tag1 xmlns="http://ns1"/>;
var n2 = new Namespace("http://ns2");
t1.@n2::a1="a1 from ns2";
var t1XMLString = t1.toXMLString();
var attrMatch = /xmlns:([^=]+)="http:\/\/ns2"/.exec(t1XMLString);
if (!attrMatch)
throw "No @n2::a1 attribute present";
var nsRegexp = new RegExp(attrMatch[1] + ':a1="a1 from ns2"');
if (!nsRegexp.test(t1XMLString))
throw "No namespace declaration present for @ns2::a1";
}
catch (e)
{
actual = e;
}
TEST(1, expect, actual);
END();

View File

@ -1,23 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.2 Namespaces - call constructors directly';
var BUGNUMBER = 444608;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var x = <xml/>;
Namespace = function() { return 10; };
x.removeNamespace("x");
TEST(1, expect, actual);
END();

View File

@ -1,23 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.2 Namespaces - call constructors directly';
var BUGNUMBER = 444608;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var x = <xml/>;
Namespace = function() { return 10; };
x.addNamespace("x");
TEST(1, expect, actual);
END();

View File

@ -1,39 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.3.1 - QName Constructor as a Function");
q = QName("foobar");
p = new QName("foobar");
TEST(1, typeof(p), typeof(q));
TEST(2, p.localName, q.localName);
TEST(3, p.uri, q.uri);
q = QName("http://foobar/", "foobar");
p = new QName("http://foobar/", "foobar");
TEST(4, typeof(p), typeof(q));
TEST(5, p.localName, q.localName);
TEST(6, p.uri, q.uri);
p1 = QName(q);
p2 = new QName(q);
TEST(7, typeof(p2), typeof(p1));
TEST(8, p2.localName, p1.localName);
TEST(9, p2.uri, p1.uri);
n = new Namespace("http://foobar/");
q = QName(n, "foobar");
p = QName(n, "foobar");
TEST(10, typeof(p), typeof(q));
TEST(11, p.localName, q.localName);
TEST(12, p.uri, q.uri);
p = QName(q);
TEST(13, p, q);
END();

View File

@ -1,51 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.3.2 - QName Constructor");
q = new QName("*");
TEST(1, "object", typeof(q));
TEST(2, "*", q.localName);
TEST(3, null, q.uri);
TEST(4, "*::*", q.toString());
// Default namespace
q = new QName("foobar");
TEST(5, "object", typeof(q));
TEST(6, "foobar", q.localName);
TEST(7, "", q.uri);
TEST(8, "foobar", q.toString());
q = new QName("http://foobar/", "foobar");
TEST(9, "object", typeof(q));
TEST(10, "foobar", q.localName);
TEST(11, "http://foobar/", q.uri);
TEST(12, "http://foobar/::foobar", q.toString());
p = new QName(q);
TEST(13, typeof(p), typeof(q));
TEST(14, q.localName, p.localName);
TEST(15, q.uri, p.uri);
n = new Namespace("http://foobar/");
q = new QName(n, "foobar");
TEST(16, "object", typeof(q));
q = new QName(null);
TEST(17, "object", typeof(q));
TEST(18, "null", q.localName);
TEST(19, "", q.uri);
TEST(20, "null", q.toString());
q = new QName(null, null);
TEST(21, "object", typeof(q));
TEST(22, "null", q.localName);
TEST(23, null, q.uri);
TEST(24, "*::null", q.toString());
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("13.3.5 - Properties of QName Instances");
q = new QName("http://someuri", "foo");
TEST(1, true, q.hasOwnProperty("localName"));
TEST(2, true, q.hasOwnProperty("uri"));
TEST(3, true, q.propertyIsEnumerable("localName"));
TEST(4, true, q.propertyIsEnumerable("uri"));
var localNameCount = 0;
var uriCount = 0;
var p;
for(p in q)
{
if(p == "localName") localNameCount++;
if(p == "uri") uriCount++;
}
TEST(5, 1, localNameCount);
TEST(6, 1, uriCount);
TEST(7, "http://someuri", q.uri);
TEST(8, "foo", q.localName);
END();

View File

@ -1,21 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.3 QName Objects - Do not assert: op == JSOP_ADD';
var BUGNUMBER = 373595;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
"" + (function () { return 1 / 2 .. y; });
TEST(1, expect, actual);
END();

View File

@ -1,23 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.3 QName Objects - Do not assert: op == JSOP_ADD';
var BUGNUMBER = 373595;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
print('This testcase does not reproduce the original issue');
"" + (function () { x %= y.@foo; const x;})
TEST(1, expect, actual);
END();

View File

@ -1,23 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.3 QName Objects - Do not assert: op == JSOP_ADD';
var BUGNUMBER = 373595;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
print('This testcase does not reproduce the original issue');
"" + (function () { x.@foo < 1;});
TEST(1, expect, actual);
END();

View File

@ -1,24 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = '13.3 QNames - call constructors directly';
var BUGNUMBER = 444608;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var x = <a><b/></a>;
QName = function() { return 10; };
x.replace("b", 10);
TEST(1, expect, actual);
END();

View File

@ -1,19 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
// |reftest| skip
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/licenses/publicdomain/
*/
var b = Proxy.create({ enumerateOwn: function () { @f; }});
Object.freeze(this);
try {
@r;
throw 1; // should not be reached
} catch (e) {
assertEq(e instanceof ReferenceError, true);
}
reportCompare(0, 0, "ok");

View File

@ -1,18 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("Standalone <![CDATA[ .... ]]> should be allowed");
printBugNumber(257679);
var x = <![CDATA[ < some & > arbitrary text ]]>;
var expected = new XML("<![CDATA[ < some & > arbitrary text ]]>");
TEST(1, expected, x);
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("Testing that replacing a list item with a new list that contains that item works");
printBugNumber(263934);
var x =
<x>
<b>two</b>
<b>three</b>
</x>;
// insert <a> element in from of first <b> element
x.b[0] = <a>one</a> + x.b[0];
var expected =
<x>
<a>one</a>
<b>two</b>
<b>three</b>
</x>;
TEST(1, expected, x);
END();

View File

@ -1,32 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("Qualified names specifying all names in no namespace should only match names without namespaces");
printBugNumber(263935);
var ns1 = new Namespace("http://www.ns1.com");
var ns2 = new Namespace("http://www.ns2.com");
var none = new Namespace();
var x = <x/>
x.foo = "one";
x.ns1::foo = "two";
x.ns2::foo = "three";
x.bar = "four";
var actual = x.none::*;
var expected =
<>
<foo>one</foo>
<bar>four</bar>
</>
TEST(1, expected, actual);
END();

View File

@ -1,30 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("Testing replacing an element with a list that contains a text node");
printBugNumber(263936);
var x =
<x>
<a>one</a>
<b>three</b>
</x>;
// insert a text node "two" between elements <a> and <b>
x.a += XML("two");
var expected =
<x>
<a>one</a>
two
<b>three</b>
</x>;
TEST(1, expected, x);
END();

View File

@ -1,18 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START("toXMLString() should escape '>'");
printBugNumber(264369);
var x = <a/>;
var chars = "<>&";
x.b = chars;
TEST(1, "<b>&lt;&gt;&amp;</b>", x.b.toXMLString());
END();

View File

@ -1,39 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START('XML("") should create empty text node');
printBugNumber(271545);
// Check that text node should ignore any attempt to add a child to it
var x;
x = new XML();
x.a = "foo";
TEST_XML(1, "", x);
x = new XML("");
x.a = "foo";
TEST_XML(2, "", x);
x = new XML(null);
x.a = "foo";
TEST_XML(3, "", x);
x = new XML(undefined);
x.a = "foo";
TEST_XML(4, "", x);
var textNodeContent = "some arbitrary text without XML markup";
x = new XML(textNodeContent);
x.a = "foo";
TEST_XML(5, textNodeContent, x);
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// testcase from Martin.Honnen@arcor.de
var summary = 'xml:lang attribute in XML literal';
var BUGNUMBER = 277650;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
expect = 'no error';
try
{
var xml = <root><text xml:lang="en">ECMAScript for XML</text></root>;
actual = 'no error';
}
catch(e)
{
actual = 'error';
}
TEST(1, expect, actual);
END();

View File

@ -1,31 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// testcase from Martin.Honnen@arcor.de
var summary = 'duplicate attribute names';
var BUGNUMBER = 277664;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
expect = 'error';
try
{
var god = <god name="Kibo" name="Xibo" />;
actual = 'no error';
}
catch(e)
{
actual = 'error';
}
TEST(1, expect, actual);
END();

View File

@ -1,32 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// testcase from Martin.Honnen@arcor.de
var summary = 'processing instruction with target name XML';
var BUGNUMBER = 277683;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
expect = 'error';
try
{
XML.ignoreProcessingInstructions = false;
var xml = <root><child>Kibo</child><?xml version="1.0"?></root>;
actual = 'no error';
}
catch(e)
{
actual = 'error';
}
TEST(1, expect, actual);
END();

View File

@ -1,27 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// testcase from Martin.Honnen@arcor.de
var summary = 'call setNamespace on element with already existing default namespace';
var BUGNUMBER = 277779;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
var xhtml2NS = new Namespace('http://www.w3.org/2002/06/xhtml2');
var xml = <html xmlns="http://www.w3.org/1999/xhtml" />;
xml.setNamespace(xhtml2NS);
expect = 'http://www.w3.org/2002/06/xhtml2';
actual = xml.namespace().toString();
TEST(1, expect, actual);
END();

View File

@ -1,34 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START('XML("") should create empty text node');
printBugNumber(277935);
// Check that assignments like "a..b = c" causes proper error
var expect = 'PASS1,PASS2';
var actual = '';
var msg = <foo><bar><s/></bar></foo>;
try {
eval('msg..s = 0');
SHOULD_THROW(1);
} catch (e) {
actual += 'PASS1';
}
try {
eval('msg..s += 0');
SHOULD_THROW(2);
} catch (e) {
actual += ',PASS2';
}
TEST(1, expect, actual);
END();

View File

@ -1,20 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip -- obsolete test
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
START('setNamespace() should not affect namespaceDeclarations()');
printBugNumber('278112');
var xhtml1NS = new Namespace('http://www.w3.org/1999/xhtml');
var xhtml = <html />;
xhtml.setNamespace(xhtml1NS);
TEST(1, 0, xhtml.namespaceDeclarations().length);
TEST(2, xhtml1NS, xhtml.namespace());
END();

View File

@ -1,25 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "13.3.5.4 - [[GetNamespace]]";
var BUGNUMBER = 283349;
var actual = 'Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var x = <x>text</x>;
var ns = new Namespace("http://foo.com/bar");
x.addNamespace(ns);
printStatus(x.toXMLString());
actual = 'No Crash';
TEST("13.3.5.4 - [[GetNamespace]]", expect, actual);
END();

View File

@ -1,29 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'Dont crash when serializing an XML object where the name ' +
'of an attribute was changed with setName';
var BUGNUMBER = 290056;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var link = <link type="simple" />;
var xlinkNamespace = new Namespace('xlink', 'http://www.w3.org/1999/xlink');
link.addNamespace(xlinkNamespace);
printStatus('In scope namespace: ' + link.inScopeNamespaces());
printStatus('XML markup: ' + link.toXMLString());
link.@type.setName(new QName(xlinkNamespace.uri, 'type'));
printStatus('name(): ' + link.@*::*[0].name());
printStatus(link.toXMLString());
TEST(1, expect, actual);
END();

View File

@ -1,20 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "11.1.5 XMLList Initialiser Don't Crash with empty Initializer";
var BUGNUMBER = 290499;
var actual = "No Crash";
var expect = "No Crash";
printBugNumber(BUGNUMBER);
START(summary);
var emptyList = <></>;
TEST(1, expect, actual);
END();

View File

@ -1,27 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "E4X - Should not repress exceptions";
var BUGNUMBER = 301553;
var actual = 'No exception';
var expect = 'exception';
printBugNumber(BUGNUMBER);
START(summary);
try
{
var x = <xml/>;
Object.toString.call(x);
}
catch(e)
{
actual = 'exception';
}
TEST(1, expect, actual);
END();

View File

@ -1,24 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "E4X - Entities";
var BUGNUMBER = 301573;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
actual = <xml>&lt;</xml>;
TEST(1, '<', actual.toString());
actual = <xml>&amp;</xml>;
TEST(2, '&', actual.toString());
END();

View File

@ -1,27 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "E4X - Do not crash with XMLList filters";
var BUGNUMBER = 301596;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
try
{
<xml/>.(@a == 1);
throw 5;
}
catch (e)
{
}
TEST(1, expect, actual);
END();

View File

@ -1,915 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip-if(!xulRuntime.shell&&isDebugBuild) slow
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Regression - Do not crash when searching large e4x tree";
var BUGNUMBER = 308111;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var xml = <prefs>
<pref><name>sessionsaver.settings.shutdown</name></pref>
<pref><name>network.http.max-persistent-connections-per-proxy</name></pref>
<pref><name>font.default.x-baltic</name></pref>
<pref><name>plugin.scan.Quicktime</name></pref>
<pref><name>capability.policy.default.DOMException.code</name></pref>
<pref><name>capability.policy.mailnews.*.innerHTML.get</name></pref>
<pref><name>capability.policy.mailnews.WebServiceProxyFactory.createProxy</name></pref>
<pref><name>capability.policy.mailnews.SchemaLoader.load</name></pref>
<pref><name>mousewheel.withcontrolkey.action</name></pref>
<pref><name>font.name.monospace.x-western</name></pref>
<pref><name>javascript.options.showInConsole</name></pref>
<pref><name>font.name.sans-serif.x-unicode</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.setDecoder</name></pref>
<pref><name>font.name-list.sans-serif.ko</name></pref>
<pref><name>browser.chrome.site_icons</name></pref>
<pref><name>app.update.auto</name></pref>
<pref><name>security.ssl2.des_64</name></pref>
<pref><name>print.always_cache_old_pres</name></pref>
<pref><name>security.ssl3.rsa_des_sha</name></pref>
<pref><name>network.proxy.http_port</name></pref>
<pref><name>browser.display.use_document_colors</name></pref>
<pref><name>browser.preferences.animateFadeIn</name></pref>
<pref><name>browser.search.defaultenginename</name></pref>
<pref><name>capability.principal.codebase.p0.id</name></pref>
<pref><name>config.use_system_prefs</name></pref>
<pref><name>font.name.monospace.x-guru</name></pref>
<pref><name>security.default_personal_cert</name></pref>
<pref><name>bidi.controlstextmode</name></pref>
<pref><name>print.show_print_progress</name></pref>
<pref><name>network.http.max-connections-per-server</name></pref>
<pref><name>profile.migration_behavior</name></pref>
<pref><name>browser.chrome.image_icons.max_size</name></pref>
<pref><name>mousewheel.horizscroll.withaltkey.action</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.onerror</name></pref>
<pref><name>greasemonkey.version</name></pref>
<pref><name>browser.search.order.Yahoo.2</name></pref>
<pref><name>font.name.sans-serif.ko</name></pref>
<pref><name>network.proxy.type</name></pref>
<pref><name>security.dialog_enable_delay</name></pref>
<pref><name>network.prefetch-next</name></pref>
<pref><name>alerts.slideIncrement</name></pref>
<pref><name>browser.blink_allowed</name></pref>
<pref><name>font.name.sans-serif.x-geor</name></pref>
<pref><name>font.name-list.sans-serif.zh-HK</name></pref>
<pref><name>print.print_footerright</name></pref>
<pref><name>capability.policy.default.History.item</name></pref>
<pref><name>browser.download.manager.showAlertOnComplete</name></pref>
<pref><name>capability.policy.default.Location.reload.get</name></pref>
<pref><name>network.IDN_show_punycode</name></pref>
<pref><name>browser.startup.homepage</name></pref>
<pref><name>network.protocol-handler.external.vbscript</name></pref>
<pref><name>signon.expireMasterPassword</name></pref>
<pref><name>capability.policy.mailnews.SchemaLoader.loadAsync</name></pref>
<pref><name>capability.policy.default.DOMException.toString.get</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.readyState</name></pref>
<pref><name>capability.policy.default.History.back.get</name></pref>
<pref><name>slider.snapMultiplier</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.abort</name></pref>
<pref><name>images.dither</name></pref>
<pref><name>print.print_headercenter</name></pref>
<pref><name>font.name.monospace.zh-HK</name></pref>
<pref><name>capability.policy.mailnews.HTMLAnchorElement.toString</name></pref>
<pref><name>font.name.serif.x-mlym</name></pref>
<pref><name>font.name.monospace.tr</name></pref>
<pref><name>advanced.mailftp</name></pref>
<pref><name>security.ssl3.rsa_fips_des_ede3_sha</name></pref>
<pref><name>application.use_ns_plugin_finder</name></pref>
<pref><name>font.name-list.cursive.ko</name></pref>
<pref><name>capability.policy.mailnews.*.data.get</name></pref>
<pref><name>browser.forms.submit.backwards_compatible</name></pref>
<pref><name>font.name.monospace.x-mlym</name></pref>
<pref><name>ui.key.menuAccessKey</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.statusText</name></pref>
<pref><name>font.name.sans-serif.x-tamil</name></pref>
<pref><name>print.print_footercenter</name></pref>
<pref><name>privacy.item.sessions</name></pref>
<pref><name>network.ftp.idleConnectionTimeout</name></pref>
<pref><name>mousewheel.withshiftkey.sysnumlines</name></pref>
<pref><name>security.ssl2.rc4_40</name></pref>
<pref><name>font.size.variable.ko</name></pref>
<pref><name>capability.policy.default.Window.focus.get</name></pref>
<pref><name>font.size.fixed.ja</name></pref>
<pref><name>browser.display.focus_ring_on_anything</name></pref>
<pref><name>capability.policy.default_policynames</name></pref>
<pref><name>network.IDN.whitelist.kr</name></pref>
<pref><name>network.IDN.whitelist.br</name></pref>
<pref><name>network.cookie.alwaysAcceptSessionCookies</name></pref>
<pref><name>dom.disable_window_status_change</name></pref>
<pref><name>app.update.channel</name></pref>
<pref><name>network.proxy.ssl_port</name></pref>
<pref><name>xpinstall.whitelist.required</name></pref>
<pref><name>browser.tabs.opentabfor.middleclick</name></pref>
<pref><name>font.size.variable.x-tamil</name></pref>
<pref><name>layout.word_select.eat_space_to_next_word</name></pref>
<pref><name>network.negotiate-auth.gsslib</name></pref>
<pref><name>mousewheel.withaltkey.action</name></pref>
<pref><name>capability.policy.default.Window.top</name></pref>
<pref><name>font.name.cursive.x-ethi</name></pref>
<pref><name>browser.goBrowsing.enabled</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.encode</name></pref>
<pref><name>font.name.sans-serif.x-guru</name></pref>
<pref><name>plugin.expose_full_path</name></pref>
<pref><name>capability.policy.default.Window.closed</name></pref>
<pref><name>font.default.x-armn</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.styleURI</name></pref>
<pref><name>font.name.sans-serif.x-mlym</name></pref>
<pref><name>security.ssl3.rsa_null_sha</name></pref>
<pref><name>capability.policy.default.Window.opener</name></pref>
<pref><name>extensions.dss.switchPending</name></pref>
<pref><name>roaming.showInitialWarning</name></pref>
<pref><name>security.ssl3.dhe_dss_des_sha</name></pref>
<pref><name>network.protocol-handler.external.disk</name></pref>
<pref><name>font.name.serif.ja</name></pref>
<pref><name>custtoolbar.personal_toolbar_folder</name></pref>
<pref><name>capability.policy.mailnews.Window.sizeToContent</name></pref>
<pref><name>capability.policy.default.XMLHttpRequest.channel</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.schemaCollection</name></pref>
<pref><name>browser.display.normal_lineheight_calc_control</name></pref>
<pref><name>capability.policy.default.Location.replace.get</name></pref>
<pref><name>font.name.cursive.ko</name></pref>
<pref><name>accessibility.browsewithcaret</name></pref>
<pref><name>browser.cache.disk.enable</name></pref>
<pref><name>network.IDN.whitelist.de</name></pref>
<pref><name>general.useragent.locale</name></pref>
<pref><name>security.ssl2.rc2_40</name></pref>
<pref><name>network.cookie.prefsMigrated</name></pref>
<pref><name>plugin.scan.SunJRE</name></pref>
<pref><name>font.name.serif.x-armn</name></pref>
<pref><name>network.protocol-handler.external.data</name></pref>
<pref><name>nglayout.debug.disable_xul_cache</name></pref>
<pref><name>ime.password.onBlur.dontCare</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.overrideMimeType</name></pref>
<pref><name>network.protocol-handler.external.mailto</name></pref>
<pref><name>print.use_global_printsettings</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.getAllResponseHeaders</name></pref>
<pref><name>security.ssl3.rsa_aes_256_sha</name></pref>
<pref><name>capability.policy.mailnews.SOAPResponse.fault</name></pref>
<pref><name>mousewheel.withcontrolkey.sysnumlines</name></pref>
<pref><name>font.name.sans-serif.x-baltic</name></pref>
<pref><name>network.protocol-handler.expose.nntp</name></pref>
<pref><name>mousewheel.horizscroll.withcontrolkey.numlines</name></pref>
<pref><name>editor.htmlWrapColumn</name></pref>
<pref><name>browser.helperApps.alwaysAsk.force</name></pref>
<pref><name>security.ssl3.dhe_rsa_des_sha</name></pref>
<pref><name>network.proxy.no_proxies_on</name></pref>
<pref><name>network.protocol-handler.external.hcp</name></pref>
<pref><name>font.name.monospace.x-cans</name></pref>
<pref><name>browser.cache.disk_cache_ssl</name></pref>
<pref><name>intl.charsetmenu.browser.more1</name></pref>
<pref><name>accessibility.typeaheadfind.startlinksonly</name></pref>
<pref><name>editor.positioning.offset</name></pref>
<pref><name>font.name-list.monospace.x-tamil</name></pref>
<pref><name>network.proxy.gopher_port</name></pref>
<pref><name>mousewheel.horizscroll.withnokey.numlines</name></pref>
<pref><name>browser.history.grouping</name></pref>
<pref><name>pfs.datasource.url</name></pref>
<pref><name>network.http.max-persistent-connections-per-server</name></pref>
<pref><name>accessibility.tabfocus</name></pref>
<pref><name>network.cookie.p3plevel</name></pref>
<pref><name>intl.charsetmenu.browser.static</name></pref>
<pref><name>editor.css.default_length_unit</name></pref>
<pref><name>intl.charset.default</name></pref>
<pref><name>capability.policy.mailnews.SOAPPropertyBagMutator.addProperty</name></pref>
<pref><name>browser.download.folderList</name></pref>
<pref><name>font.name.sans-serif.tr</name></pref>
<pref><name>font.name-list.monospace.x-devanagari</name></pref>
<pref><name>font.name.sans-serif.x-devanagari</name></pref>
<pref><name>capability.policy.mailnews.Window.innerHeight.set</name></pref>
<pref><name>browser.tabs.warnOnClose</name></pref>
<pref><name>security.ssl3.rsa_des_ede3_sha</name></pref>
<pref><name>signed.applets.codebase_principal_support</name></pref>
<pref><name>print.extend_native_print_dialog</name></pref>
<pref><name>font.name-list.monospace.x-cans</name></pref>
<pref><name>font.name-list.serif.x-khmr</name></pref>
<pref><name>font.name.monospace.x-cyrillic</name></pref>
<pref><name>network.protocol-handler.warn-external.snews</name></pref>
<pref><name>permissions.default.image</name></pref>
<pref><name>font.name.monospace.ko</name></pref>
<pref><name>font.name-list.monospace.zh-TW</name></pref>
<pref><name>general.smoothScroll</name></pref>
<pref><name>font.name-list.serif.zh-CN</name></pref>
<pref><name>font.name.sans-serif.zh-TW</name></pref>
<pref><name>network.protocol-handler.warn-external.mailto</name></pref>
<pref><name>capability.policy.default.DOMException.name</name></pref>
<pref><name>font.name-list.serif.x-mlym</name></pref>
<pref><name>network.http.sendSecureXSiteReferrer</name></pref>
<pref><name>intl.charsetmenu.mailedit</name></pref>
<pref><name>capability.policy.mailnews.*.src.get</name></pref>
<pref><name>app.update.showInstalledUI</name></pref>
<pref><name>font.default.x-devanagari</name></pref>
<pref><name>dom.disable_window_open_feature.location</name></pref>
<pref><name>capability.policy.default.DOMException.result</name></pref>
<pref><name>font.name-list.monospace.x-beng</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.getResponseHeader</name></pref>
<pref><name>accessibility.usebrailledisplay</name></pref>
<pref><name>network.enableIDN</name></pref>
<pref><name>font.name.cursive.tr</name></pref>
<pref><name>capability.policy.default.Location.href.set</name></pref>
<pref><name>font.size.fixed.zh-CN</name></pref>
<pref><name>font.name-list.sans-serif.zh-TW</name></pref>
<pref><name>network.protocol-handler.expose.snews</name></pref>
<pref><name>capability.policy.mailnews.SchemaLoader.onError</name></pref>
<pref><name>accessibility.typeaheadfind.timeout</name></pref>
<pref><name>capability.policy.default.History.next</name></pref>
<pref><name>font.size.fixed.x-geor</name></pref>
<pref><name>print.print_headerleft</name></pref>
<pref><name>browser.search.update</name></pref>
<pref><name>middlemouse.scrollbarPosition</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.decode</name></pref>
<pref><name>dom.disable_window_open_feature.scrollbars</name></pref>
<pref><name>security.ssl2.rc2_128</name></pref>
<pref><name>network.protocol-handler.external-default</name></pref>
<pref><name>dom.disable_window_open_feature.titlebar</name></pref>
<pref><name>startup.homepage_override_url</name></pref>
<pref><name>dom.popup_allowed_events</name></pref>
<pref><name>network.proxy.socks_port</name></pref>
<pref><name>capability.policy.default.Location.hash.set</name></pref>
<pref><name>browser.startup.page</name></pref>
<pref><name>print.whileInPrintPreview</name></pref>
<pref><name>font.default.x-khmr</name></pref>
<pref><name>mousewheel.withshiftkey.action</name></pref>
<pref><name>mousewheel.withaltkey.sysnumlines</name></pref>
<pref><name>font.size.fixed.x-baltic</name></pref>
<pref><name>capability.policy.mailnews.Window.moveBy</name></pref>
<pref><name>network.http.pipelining</name></pref>
<pref><name>plugin.override_internal_types</name></pref>
<pref><name>font.size.fixed.x-gujr</name></pref>
<pref><name>security.ssl2.des_ede3_192</name></pref>
<pref><name>browser.visited_color</name></pref>
<pref><name>capability.policy.mailnews.*.nodeValue.get</name></pref>
<pref><name>font.default.x-beng</name></pref>
<pref><name>intl.charsetmenu.browser.more4</name></pref>
<pref><name>network.http.keep-alive</name></pref>
<pref><name>ui.key.accelKey</name></pref>
<pref><name>browser.fixup.alternate.enabled</name></pref>
<pref><name>font.name-list.serif.x-cans</name></pref>
<pref><name>security.enable_ssl3</name></pref>
<pref><name>print.print_headerright</name></pref>
<pref><name>network.IDN.whitelist.th</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.unmapSchemaURI</name></pref>
<pref><name>capability.policy.mailnews.Range.toString</name></pref>
<pref><name>print.print_edge_bottom</name></pref>
<pref><name>network.IDN.blacklist_chars</name></pref>
<pref><name>browser.display.foreground_color</name></pref>
<pref><name>font.default.zh-CN</name></pref>
<pref><name>network.cookie.cookieBehavior</name></pref>
<pref><name>dom.disable_image_src_set</name></pref>
<pref><name>font.default.x-cans</name></pref>
<pref><name>capability.policy.mailnews.Window.screenY.set</name></pref>
<pref><name>network.cookie.enableForCurrentSessionOnly</name></pref>
<pref><name>app.update.timer</name></pref>
<pref><name>layout.word_select.stop_at_punctuation</name></pref>
<pref><name>browser.search.order.Yahoo</name></pref>
<pref><name>middlemouse.paste</name></pref>
<pref><name>font.name.sans-serif.zh-HK</name></pref>
<pref><name>dom.disable_window_open_feature.toolbar</name></pref>
<pref><name>dom.popup_maximum</name></pref>
<pref><name>mousewheel.horizscroll.withaltkey.numlines</name></pref>
<pref><name>browser.tabs.warnOnCloseOther</name></pref>
<pref><name>intl.accept_charsets</name></pref>
<pref><name>font.name.monospace.x-central-euro</name></pref>
<pref><name>alerts.height</name></pref>
<pref><name>font.name-list.serif.x-tamil</name></pref>
<pref><name>capability.policy.mailnews.SchemaLoader.onLoad</name></pref>
<pref><name>font.size.variable.x-western</name></pref>
<pref><name>keyword.URL</name></pref>
<pref><name>capability.policy.default.Window.self</name></pref>
<pref><name>browser.dom.window.dump.enabled</name></pref>
<pref><name>font.name.sans-serif.x-beng</name></pref>
<pref><name>privacy.item.siteprefs</name></pref>
<pref><name>font.name.cursive.x-baltic</name></pref>
<pref><name>network.protocol-handler.external.nntp</name></pref>
<pref><name>security.ssl3.dhe_dss_des_ede3_sha</name></pref>
<pref><name>font.name.serif.x-western</name></pref>
<pref><name>capability.policy.mailnews.sites</name></pref>
<pref><name>font.name-list.serif.x-beng</name></pref>
<pref><name>dom.event.contextmenu.enabled</name></pref>
<pref><name>browser.urlbar.clickSelectsAll</name></pref>
<pref><name>font.size.fixed.zh-HK</name></pref>
<pref><name>capability.policy.mailnews.SOAPCall.invoke</name></pref>
<pref><name>capability.policy.default.SOAPCall.invokeVerifySourceHeader</name></pref>
<pref><name>font.size.fixed.x-guru</name></pref>
<pref><name>viewmanager.do_doublebuffering</name></pref>
<pref><name>font.name.sans-serif.x-cans</name></pref>
<pref><name>capability.policy.mailnews.*.href.get</name></pref>
<pref><name>font.size.fixed.he</name></pref>
<pref><name>dom.max_script_run_time</name></pref>
<pref><name>capability.policy.default.Navigator.preference</name></pref>
<pref><name>security.ssl2.rc4_128</name></pref>
<pref><name>browser.link.open_newwindow</name></pref>
<pref><name>accessibility.tabfocus_applies_to_xul</name></pref>
<pref><name>security.ssl3.rsa_rc4_128_sha</name></pref>
<pref><name>font.size.variable.x-unicode</name></pref>
<pref><name>mousewheel.withcontrolkey.numlines</name></pref>
<pref><name>font.name.monospace.x-ethi</name></pref>
<pref><name>font.default.zh-HK</name></pref>
<pref><name>browser.tabs.loadBookmarksInBackground</name></pref>
<pref><name>browser.fixup.hide_user_pass</name></pref>
<pref><name>capability.policy.mailnews.HTMLDocument.URL</name></pref>
<pref><name>plugin.scan.Acrobat</name></pref>
<pref><name>font.name.serif.x-cyrillic</name></pref>
<pref><name>intl.accept_languages</name></pref>
<pref><name>capability.policy.mailnews.*.host.get</name></pref>
<pref><name>security.directory</name></pref>
<pref><name>security.ssl3.dhe_rsa_aes_128_sha</name></pref>
<pref><name>font.size.variable.zh-HK</name></pref>
<pref><name>browser.display.use_focus_colors</name></pref>
<pref><name>capability.policy.default.DOMException.message</name></pref>
<pref><name>intl.charsetmenu.browser.unicode</name></pref>
<pref><name>greasemonkey.editor</name></pref>
<pref><name>intl.charsetmenu.composer.cache</name></pref>
<pref><name>font.default.x-tamil</name></pref>
<pref><name>capability.policy.default.DOMParser.parseFromStream</name></pref>
<pref><name>network.http.version</name></pref>
<pref><name>capability.policy.default.History.previous</name></pref>
<pref><name>signon.SignonFileName</name></pref>
<pref><name>font.name.monospace.zh-CN</name></pref>
<pref><name>app.update.silent</name></pref>
<pref><name>font.name-list.monospace.x-mlym</name></pref>
<pref><name>browser.underline_anchors</name></pref>
<pref><name>capability.policy.default.Navigator.preferenceinternal.set</name></pref>
<pref><name>intl.jis0208.map</name></pref>
<pref><name>network.automatic-ntlm-auth.trusted-uris</name></pref>
<pref><name>browser.chrome.toolbar_tips</name></pref>
<pref><name>mousewheel.withshiftkey.numlines</name></pref>
<pref><name>font.name.sans-serif.x-western</name></pref>
<pref><name>browser.download.manager.showWhenStarting</name></pref>
<pref><name>browser.enable_automatic_image_resizing</name></pref>
<pref><name>privacy.item.passwords</name></pref>
<pref><name>app.update.incompatible.mode</name></pref>
<pref><name>capability.policy.mailnews.WSDLLoader.loadAsync</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.getAssociatedEncoding</name></pref>
<pref><name>browser.sessionhistory.max_entries</name></pref>
<pref><name>sessionsaver.windows.cookies</name></pref>
<pref><name>network.image.warnAboutImages</name></pref>
<pref><name>browser.cache.disk.capacity</name></pref>
<pref><name>font.size.variable.ja</name></pref>
<pref><name>plugin.scan.plid.all</name></pref>
<pref><name>print.print_extra_margin</name></pref>
<pref><name>browser.download.manager.focusWhenStarting</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.channel</name></pref>
<pref><name>font.name.sans-serif.x-armn</name></pref>
<pref><name>network.proxy.socks_version</name></pref>
<pref><name>xpinstall.whitelist.add.103</name></pref>
<pref><name>browser.download.manager.alertOnEXEOpen</name></pref>
<pref><name>network.IDN.whitelist.ch</name></pref>
<pref><name>xpinstall.dialog.progress.chrome</name></pref>
<pref><name>network.online</name></pref>
<pref><name>capability.policy.default.HTMLDocument.open.get</name></pref>
<pref><name>general.startup.browser</name></pref>
<pref><name>security.OCSP.enabled</name></pref>
<pref><name>font.size.fixed.x-khmr</name></pref>
<pref><name>config.use_system_prefs.accessibility</name></pref>
<pref><name>font.default.ja</name></pref>
<pref><name>print.print_edge_top</name></pref>
<pref><name>print.print_edge_left</name></pref>
<pref><name>network.dns.ipv4OnlyDomains</name></pref>
<pref><name>browser.tabs.autoHide</name></pref>
<pref><name>browser.search.order.2</name></pref>
<pref><name>font.name.sans-serif.he</name></pref>
<pref><name>browser.tabs.loadGroup</name></pref>
<pref><name>font.name.monospace.x-beng</name></pref>
<pref><name>intl.locale.matchOS</name></pref>
<pref><name>font.name.serif.zh-CN</name></pref>
<pref><name>capability.policy.mailnews.*.protocol.get</name></pref>
<pref><name>network.IDN.whitelist.tm</name></pref>
<pref><name>network.cookie.denyRemovedCookies</name></pref>
<pref><name>browser.search.order.Yahoo.1</name></pref>
<pref><name>font.size.fixed.x-ethi</name></pref>
<pref><name>sessionsaver.prefs_set</name></pref>
<pref><name>alerts.totalOpenTime</name></pref>
<pref><name>browser.tabs.loadInBackground</name></pref>
<pref><name>mousewheel.horizscroll.withnokey.sysnumlines</name></pref>
<pref><name>network.negotiate-auth.using-native-gsslib</name></pref>
<pref><name>accessibility.warn_on_browsewithcaret</name></pref>
<pref><name>security.ssl3.rsa_fips_des_sha</name></pref>
<pref><name>network.protocol-handler.external.shell</name></pref>
<pref><name>ui.key.generalAccessKey</name></pref>
<pref><name>font.size.variable.zh-CN</name></pref>
<pref><name>network.automatic-ntlm-auth.allow-proxies</name></pref>
<pref><name>capability.policy.mailnews.Window.moveTo</name></pref>
<pref><name>nglayout.events.dispatchLeftClickOnly</name></pref>
<pref><name>font.name.serif.x-devanagari</name></pref>
<pref><name>security.checkloaduri</name></pref>
<pref><name>network.protocol-handler.external.javascript</name></pref>
<pref><name>security.ssl3.rsa_rc2_40_md5</name></pref>
<pref><name>network.IDN.whitelist.dk</name></pref>
<pref><name>mousewheel.horizscroll.withaltkey.sysnumlines</name></pref>
<pref><name>nglayout.debug.enable_xbl_forms</name></pref>
<pref><name>network.proxy.socks</name></pref>
<pref><name>font.size.variable.x-central-euro</name></pref>
<pref><name>network.IDN.whitelist.jp</name></pref>
<pref><name>font.size.variable.zh-TW</name></pref>
<pref><name>network.IDN.whitelist.museum</name></pref>
<pref><name>font.name-list.serif.zh-TW</name></pref>
<pref><name>browser.chrome.toolbar_style</name></pref>
<pref><name>mousewheel.horizscroll.withshiftkey.numlines</name></pref>
<pref><name>capability.policy.default.Window.close.get</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.defaultEncoder</name></pref>
<pref><name>browser.download.manager.retention</name></pref>
<pref><name>capability.policy.mailnews.*.baseURI.get</name></pref>
<pref><name>network.IDN.whitelist.fi</name></pref>
<pref><name>capability.policy.mailnews.WSDLLoader.load</name></pref>
<pref><name>network.protocol-handler.warn-external.news</name></pref>
<pref><name>dom.disable_open_during_load</name></pref>
<pref><name>general.useragent.extra.firefox</name></pref>
<pref><name>font.size.variable.x-ethi</name></pref>
<pref><name>font.default.tr</name></pref>
<pref><name>dom.disable_window_open_feature.resizable</name></pref>
<pref><name>sessionsaver.windows.session0</name></pref>
<pref><name>network.proxy.failover_timeout</name></pref>
<pref><name>general.skins.selectedSkin</name></pref>
<pref><name>font.name.monospace.x-unicode</name></pref>
<pref><name>network.protocol-handler.expose-all</name></pref>
<pref><name>privacy.item.downloads</name></pref>
<pref><name>font.name.monospace.el</name></pref>
<pref><name>browser.preferences.instantApply</name></pref>
<pref><name>font.name-list.serif.ko</name></pref>
<pref><name>editor.resizing.preserve_ratio</name></pref>
<pref><name>font.default.x-ethi</name></pref>
<pref><name>privacy.sanitize.promptOnSanitize</name></pref>
<pref><name>font.name.serif.x-cans</name></pref>
<pref><name>font.name-list.monospace.x-geor</name></pref>
<pref><name>network.hosts.nntp_server</name></pref>
<pref><name>font.size.variable.x-khmr</name></pref>
<pref><name>capability.policy.mailnews.*.text.get</name></pref>
<pref><name>network.protocol-handler.warn-external.nntp</name></pref>
<pref><name>font.default.x-unicode</name></pref>
<pref><name>capability.policy.mailnews.Window.resizeTo</name></pref>
<pref><name>font.name.monospace.zh-TW</name></pref>
<pref><name>font.default.ko</name></pref>
<pref><name>network.IDN.whitelist.tw</name></pref>
<pref><name>signon.rememberSignons</name></pref>
<pref><name>profile.manage_only_at_launch</name></pref>
<pref><name>security.warn_leaving_secure</name></pref>
<pref><name>font.language.group</name></pref>
<pref><name>network.http.pipelining.maxrequests</name></pref>
<pref><name>capability.policy.mailnews.WSDLLoader.onError</name></pref>
<pref><name>capability.policy.mailnews.Window.outerWidth.set</name></pref>
<pref><name>security.ask_for_password</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.defaultDecoder</name></pref>
<pref><name>font.default.x-gujr</name></pref>
<pref><name>capability.policy.mailnews.XMLSerializer.serializeToStream</name></pref>
<pref><name>network.autodial-helper.enabled</name></pref>
<pref><name>font.size.fixed.x-central-euro</name></pref>
<pref><name>alerts.slideIncrementTime</name></pref>
<pref><name>capability.policy.mailnews.Window.blur</name></pref>
<pref><name>network.http.accept.default</name></pref>
<pref><name>network.http.proxy.keep-alive</name></pref>
<pref><name>privacy.sanitize.sanitizeOnShutdown</name></pref>
<pref><name>capability.policy.mailnews.*.getNamedItemNS</name></pref>
<pref><name>network.protocol-handler.external.snews</name></pref>
<pref><name>layout.enable_japanese_specific_transform</name></pref>
<pref><name>general.useragent.contentlocale</name></pref>
<pref><name>ui.key.menuAccessKeyFocuses</name></pref>
<pref><name>plugin.scan.WindowsMediaPlayer</name></pref>
<pref><name>font.name.cursive.x-western</name></pref>
<pref><name>intl.charset.detector</name></pref>
<pref><name>browser.download.save_converter_index</name></pref>
<pref><name>image.animation_mode</name></pref>
<pref><name>network.http.sendRefererHeader</name></pref>
<pref><name>font.default.x-central-euro</name></pref>
<pref><name>network.protocol-handler.external.ms-help</name></pref>
<pref><name>font.default.x-geor</name></pref>
<pref><name>browser.download.manager.openDelay</name></pref>
<pref><name>dom.disable_window_open_feature.personalbar</name></pref>
<pref><name>capability.policy.mailnews.SOAPHeaderBlock.mustUnderstand</name></pref>
<pref><name>intl.keyboard.per_window_layout</name></pref>
<pref><name>network.dir.format</name></pref>
<pref><name>capability.policy.default.Clipboard.cutcopy</name></pref>
<pref><name>capability.policy.default.Window.window</name></pref>
<pref><name>font.name.sans-serif.x-ethi</name></pref>
<pref><name>print.use_native_print_dialog</name></pref>
<pref><name>browser.search.defaulturl</name></pref>
<pref><name>font.name-list.serif.zh-HK</name></pref>
<pref><name>network.negotiate-auth.trusted-uris</name></pref>
<pref><name>intl.charsetmenu.browser.cache</name></pref>
<pref><name>intl.menuitems.insertseparatorbeforeaccesskeys</name></pref>
<pref><name>network.protocol-handler.external.news</name></pref>
<pref><name>greasemonkey.enabled</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.send</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.getEncoder</name></pref>
<pref><name>profile.seconds_until_defunct</name></pref>
<pref><name>font.size.variable.x-beng</name></pref>
<pref><name>mousewheel.horizscroll.withnokey.action</name></pref>
<pref><name>bidi.texttype</name></pref>
<pref><name>network.protocol-handler.expose.news</name></pref>
<pref><name>network.negotiate-auth.delegation-uris</name></pref>
<pref><name>font.name.serif.zh-TW</name></pref>
<pref><name>network.IDN.whitelist.gr</name></pref>
<pref><name>general.useragent.security</name></pref>
<pref><name>extensions.disabledObsolete</name></pref>
<pref><name>browser.download.manager.closeWhenDone</name></pref>
<pref><name>network.proxy.ftp_port</name></pref>
<pref><name>privacy.item.cookies</name></pref>
<pref><name>capability.policy.mailnews.*.lowSrc.get</name></pref>
<pref><name>font.name-list.serif.x-ethi</name></pref>
<pref><name>font.name.serif.x-unicode</name></pref>
<pref><name>pref.advanced.proxies.disable_button.reload</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.onload</name></pref>
<pref><name>browser.download.show_plugins_in_list</name></pref>
<pref><name>font.size.fixed.th</name></pref>
<pref><name>font.size.fixed.zh-TW</name></pref>
<pref><name>print.save_print_settings</name></pref>
<pref><name>bidi.browser.ui</name></pref>
<pref><name>extensions.update.url</name></pref>
<pref><name>font.name-list.monospace.x-khmr</name></pref>
<pref><name>intl.charsetmenu.browser.more2</name></pref>
<pref><name>security.ssl3.dhe_dss_aes_256_sha</name></pref>
<pref><name>capability.policy.mailnews.document.load</name></pref>
<pref><name>security.ssl3.rsa_rc4_40_md5</name></pref>
<pref><name>privacy.item.cache</name></pref>
<pref><name>browser.search.param.Google.1.default</name></pref>
<pref><name>browser.active_color</name></pref>
<pref><name>font.name-list.monospace.zh-HK</name></pref>
<pref><name>browser.display.show_image_placeholders</name></pref>
<pref><name>ime.password.onFocus.dontCare</name></pref>
<pref><name>middlemouse.contentLoadURL</name></pref>
<pref><name>font.name-list.monospace.x-armn</name></pref>
<pref><name>svg.enabled</name></pref>
<pref><name>capability.policy.default.Window.location</name></pref>
<pref><name>dom.disable_window_flip</name></pref>
<pref><name>font.size.variable.x-cyrillic</name></pref>
<pref><name>font.size.fixed.x-western</name></pref>
<pref><name>font.size.variable.x-devanagari</name></pref>
<pref><name>capability.policy.mailnews.XMLSerializer.serializeToString</name></pref>
<pref><name>bidi.support</name></pref>
<pref><name>browser.display.background_color</name></pref>
<pref><name>capability.policy.default.History.go.get</name></pref>
<pref><name>font.size.variable.x-armn</name></pref>
<pref><name>font.size.variable.el</name></pref>
<pref><name>network.cookie.p3p</name></pref>
<pref><name>mousewheel.horizscroll.withcontrolkey.sysnumlines</name></pref>
<pref><name>app.update.url</name></pref>
<pref><name>font.name.cursive.he</name></pref>
<pref><name>network.http.redirection-limit</name></pref>
<pref><name>network.ntlm.send-lm-response</name></pref>
<pref><name>converter.html2txt.header_strategy</name></pref>
<pref><name>browser.offline</name></pref>
<pref><name>network.proxy.ftp</name></pref>
<pref><name>dom.disable_window_open_feature.directories</name></pref>
<pref><name>capability.policy.default.Clipboard.paste</name></pref>
<pref><name>browser.related.disabledForDomains</name></pref>
<pref><name>font.name.sans-serif.x-cyrillic</name></pref>
<pref><name>intl.charsetmenu.browser.cache.size</name></pref>
<pref><name>capability.policy.mailnews.SOAPCall.transportURI</name></pref>
<pref><name>browser.shell.checkDefaultBrowser</name></pref>
<pref><name>network.proxy.http</name></pref>
<pref><name>capability.policy.default.History.current</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.faultNamespaceURI</name></pref>
<pref><name>capability.policy.mailnews.*.getAttribute</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.responseText</name></pref>
<pref><name>network.IDN.whitelist.sh</name></pref>
<pref><name>browser.cache.check_doc_frequency</name></pref>
<pref><name>layout.frames.force_resizability</name></pref>
<pref><name>capability.policy.default.Window.frames</name></pref>
<pref><name>app.update.url.manual</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.element</name></pref>
<pref><name>browser.trim_user_and_password</name></pref>
<pref><name>font.size.variable.tr</name></pref>
<pref><name>browser.fixup.alternate.suffix</name></pref>
<pref><name>browser.download.manager.showAlertInterval</name></pref>
<pref><name>security.warn_viewing_mixed.show_once</name></pref>
<pref><name>browser.helperApps.neverAsk.openFile</name></pref>
<pref><name>font.name.sans-serif.x-central-euro</name></pref>
<pref><name>capability.policy.mailnews.SOAPCall.asyncInvoke</name></pref>
<pref><name>mousewheel.withnokey.numlines</name></pref>
<pref><name>font.name.serif.tr</name></pref>
<pref><name>privacy.popups.showBrowserMessage</name></pref>
<pref><name>browser.feedview.showMenu</name></pref>
<pref><name>font.name-list.serif.x-gujr</name></pref>
<pref><name>browser.feedview.reloadInterval</name></pref>
<pref><name>security.ui.enable</name></pref>
<pref><name>editor.use_css</name></pref>
<pref><name>network.IDN.whitelist.io</name></pref>
<pref><name>browser.related.enabled</name></pref>
<pref><name>browser.sessionhistory.max_viewers</name></pref>
<pref><name>font.size.variable.x-guru</name></pref>
<pref><name>font.size.variable.x-gujr</name></pref>
<pref><name>network.protocol-handler.external.vnd.ms.radio</name></pref>
<pref><name>browser.tabs.opentabfor.urlbar</name></pref>
<pref><name>font.name.sans-serif.x-khmr</name></pref>
<pref><name>mousewheel.horizscroll.withshiftkey.sysnumlines</name></pref>
<pref><name>network.protocol-handler.external.afp</name></pref>
<pref><name>font.name-list.serif.x-guru</name></pref>
<pref><name>intl.charsetmenu.browser.more5</name></pref>
<pref><name>security.ssl3.rsa_rc4_128_md5</name></pref>
<pref><name>font.default.he</name></pref>
<pref><name>font.size.fixed.ko</name></pref>
<pref><name>font.name-list.monospace.ko</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.onreadystatechange</name></pref>
<pref><name>print.print_edge_right</name></pref>
<pref><name>browser.popups.showPopupBlocker</name></pref>
<pref><name>app.update.nagTimer.restart</name></pref>
<pref><name>capability.policy.mailnews.Location.toString</name></pref>
<pref><name>font.default.x-cyrillic</name></pref>
<pref><name>font.size.fixed.x-unicode</name></pref>
<pref><name>clipboard.autocopy</name></pref>
<pref><name>font.name.monospace.ja</name></pref>
<pref><name>browser.tabs.loadFolderAndReplace</name></pref>
<pref><name>font.name.monospace.x-khmr</name></pref>
<pref><name>font.size.variable.x-baltic</name></pref>
<pref><name>font.name.serif.x-tamil</name></pref>
<pref><name>font.name-list.monospace.x-gujr</name></pref>
<pref><name>browser.urlbar.matchOnlyTyped</name></pref>
<pref><name>capability.policy.mailnews.SOAPHeaderBlock.actorURI</name></pref>
<pref><name>font.name-list.sans-serif.zh-CN</name></pref>
<pref><name>extensions.update.interval</name></pref>
<pref><name>network.IDN.whitelist.cn</name></pref>
<pref><name>font.size.variable.he</name></pref>
<pref><name>security.ssl3.dhe_rsa_des_ede3_sha</name></pref>
<pref><name>dom.disable_window_open_feature.close</name></pref>
<pref><name>font.name.cursive.el</name></pref>
<pref><name>bidi.characterset</name></pref>
<pref><name>font.name.cursive.x-unicode</name></pref>
<pref><name>network.proxy.share_proxy_settings</name></pref>
<pref><name>network.cookie.disableCookieForMailNews</name></pref>
<pref><name>general.config.obscure_value</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.open</name></pref>
<pref><name>dom.allow_scripts_to_close_windows</name></pref>
<pref><name>network.IDN.whitelist.se</name></pref>
<pref><name>mousewheel.horizscroll.withcontrolkey.action</name></pref>
<pref><name>capability.policy.mailnews.WebServiceProxyFactory.onLoad</name></pref>
<pref><name>browser.tabs.forceHide</name></pref>
<pref><name>accessibility.typeaheadfind.enablesound</name></pref>
<pref><name>font.size.fixed.x-cans</name></pref>
<pref><name>capability.policy.default.HTMLDocument.close.get</name></pref>
<pref><name>font.size.fixed.el</name></pref>
<pref><name>font.name.cursive.x-cyrillic</name></pref>
<pref><name>font.default.x-guru</name></pref>
<pref><name>browser.chromeURL</name></pref>
<pref><name>roaming.default.files</name></pref>
<pref><name>profile.confirm_automigration</name></pref>
<pref><name>browser.link.open_external</name></pref>
<pref><name>font.name-list.serif.x-armn</name></pref>
<pref><name>font.name.serif.el</name></pref>
<pref><name>font.name-list.monospace.ja</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.getInternalSchemaURI</name></pref>
<pref><name>browser.bookmarks.sort.direction</name></pref>
<pref><name>browser.download.manager.flashCount</name></pref>
<pref><name>browser.formfill.enable</name></pref>
<pref><name>font.size.fixed.x-beng</name></pref>
<pref><name>print.print_footerleft</name></pref>
<pref><name>capability.policy.default.Window.parent</name></pref>
<pref><name>capability.policy.mailnews.SOAPCall.verifySourceHeader</name></pref>
<pref><name>browser.download.lastDir</name></pref>
<pref><name>sessionsaver.windows.zorder</name></pref>
<pref><name>xpinstall.enabled</name></pref>
<pref><name>capability.policy.mailnews.*.getAttributeNS</name></pref>
<pref><name>capability.policy.mailnews.*.pathname.get</name></pref>
<pref><name>xpinstall.dialog.progress.type.skin</name></pref>
<pref><name>browser.windows.loadOnNewWindow</name></pref>
<pref><name>font.name-list.serif.he</name></pref>
<pref><name>browser.link.open_newwindow.restriction</name></pref>
<pref><name>font.name-list.monospace.he</name></pref>
<pref><name>font.name.sans-serif.ja</name></pref>
<pref><name>editor.singleLine.pasteNewlines</name></pref>
<pref><name>accessibility.typeaheadfind.soundURL</name></pref>
<pref><name>capability.policy.mailnews.Window.outerHeight.set</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.faultActor</name></pref>
<pref><name>font.size.fixed.tr</name></pref>
<pref><name>browser.search.param.Google.1.custom</name></pref>
<pref><name>extensions.logging.enabled</name></pref>
<pref><name>browser.frames.enabled</name></pref>
<pref><name>font.default.th</name></pref>
<pref><name>network.IDN.whitelist.lt</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.mapSchemaURI</name></pref>
<pref><name>network.hosts.smtp_server</name></pref>
<pref><name>mousewheel.withnokey.sysnumlines</name></pref>
<pref><name>browser.tabs.loadOnNewTab</name></pref>
<pref><name>font.name.sans-serif.el</name></pref>
<pref><name>browser.display.focus_ring_width</name></pref>
<pref><name>font.size.variable.x-mlym</name></pref>
<pref><name>font.name.serif.x-khmr</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.status</name></pref>
<pref><name>intl.charsetmenu.mailview.cache</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.setEncoder</name></pref>
<pref><name>privacy.popups.usecustom</name></pref>
<pref><name>font.name-list.serif.x-geor</name></pref>
<pref><name>capability.policy.mailnews.WSDLLoader.onLoad</name></pref>
<pref><name>dom.disable_window_open_feature.minimizable</name></pref>
<pref><name>accessibility.typeaheadfind</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.detail</name></pref>
<pref><name>capability.policy.default.Window.document</name></pref>
<pref><name>font.size.variable.x-geor</name></pref>
<pref><name>xpinstall.dialog.confirm</name></pref>
<pref><name>intl.collationOption</name></pref>
<pref><name>browser.cache.memory.enable</name></pref>
<pref><name>font.size.variable.x-cans</name></pref>
<pref><name>browser.hiddenWindowChromeURL</name></pref>
<pref><name>font.name-list.serif.x-devanagari</name></pref>
<pref><name>capability.principal.codebase.p0.subjectName</name></pref>
<pref><name>capability.policy.mailnews.*.hostname.get</name></pref>
<pref><name>intl.fallbackCharsetList.ISO-8859-1</name></pref>
<pref><name>network.IDN.whitelist.li</name></pref>
<pref><name>javascript.options.strict</name></pref>
<pref><name>font.name.cursive.ar</name></pref>
<pref><name>browser.search.selectedEngine</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.getDecoder</name></pref>
<pref><name>general.autoScroll</name></pref>
<pref><name>font.default.x-western</name></pref>
<pref><name>browser.display.use_system_colors</name></pref>
<pref><name>extensions.ignoreMTimeChanges</name></pref>
<pref><name>network.hosts.pop_server</name></pref>
<pref><name>privacy.item.history</name></pref>
<pref><name>security.password_lifetime</name></pref>
<pref><name>security.ssl3.dhe_dss_aes_128_sha</name></pref>
<pref><name>font.name.monospace.x-tamil</name></pref>
<pref><name>xpinstall.dialog.progress.type.chrome</name></pref>
<pref><name>capability.policy.mailnews.SchemaLoader.processSchemaElement</name></pref>
<pref><name>capability.policy.mailnews.DOMParser,parseFromString</name></pref>
<pref><name>network.http.proxy.pipelining</name></pref>
<pref><name>security.ssl3.rsa_1024_rc4_56_sha</name></pref>
<pref><name>browser.history_expire_days</name></pref>
<pref><name>capability.policy.mailnews.DOMException.toString</name></pref>
<pref><name>font.name.serif.x-gujr</name></pref>
<pref><name>browser.display.force_inline_alttext</name></pref>
<pref><name>security.ssl3.rsa_1024_des_cbc_sha</name></pref>
<pref><name>mousewheel.horizscroll.withshiftkey.action</name></pref>
<pref><name>font.size.fixed.x-mlym</name></pref>
<pref><name>font.name-list.cursive.he</name></pref>
<pref><name>capability.policy.mailnews.Window.screenX.set</name></pref>
<pref><name>font.name.serif.x-ethi</name></pref>
<pref><name>network.cookie.lifetime.days</name></pref>
<pref><name>view_source.wrap_long_lines</name></pref>
<pref><name>network.IDN.whitelist.hu</name></pref>
<pref><name>browser.bookmarks.sort.resource</name></pref>
<pref><name>capability.policy.mailnews.*.getNamedItem</name></pref>
<pref><name>security.warn_viewing_mixed</name></pref>
<pref><name>browser.xul.error_pages.enabled</name></pref>
<pref><name>capability.policy.mailnews.WebServiceProxyFactory.createProxyAsync</name></pref>
<pref><name>capability.policy.mailnews.DOMParser,parseFromStream</name></pref>
<pref><name>network.proxy.autoconfig_url</name></pref>
<pref><name>capability.policy.mailnews.SOAPPropertyBagMutator.propertyBag</name></pref>
<pref><name>xpinstall.dialog.progress.skin</name></pref>
<pref><name>browser.download.hide_plugins_without_extensions</name></pref>
<pref><name>network.protocol-handler.warn-external-default</name></pref>
<pref><name>font.name.serif.he</name></pref>
<pref><name>font.name.cursive.th</name></pref>
<pref><name>network.negotiate-auth.allow-proxies</name></pref>
<pref><name>capability.policy.default.Window.Components</name></pref>
<pref><name>font.name.serif.x-central-euro</name></pref>
<pref><name>font.size.fixed.x-tamil</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.faultString</name></pref>
<pref><name>app.update.mode</name></pref>
<pref><name>font.name.serif.x-guru</name></pref>
<pref><name>capability.policy.mailnews.*.title.get</name></pref>
<pref><name>font.name.monospace.x-gujr</name></pref>
<pref><name>app.update.nagTimer.download</name></pref>
<pref><name>dom.disable_window_move_resize</name></pref>
<pref><name>browser.download.useDownloadDir</name></pref>
<pref><name>font.name.sans-serif.ar</name></pref>
<pref><name>network.IDN.whitelist.no</name></pref>
<pref><name>browser.display.screen_resolution</name></pref>
<pref><name>extensions.dss.enabled</name></pref>
<pref><name>network.http.request.max-start-delay</name></pref>
<pref><name>font.size.fixed.ar</name></pref>
<pref><name>extensions.update.enabled</name></pref>
<pref><name>network.auth.use-sspi</name></pref>
<pref><name>sessionsaver.settings.dontwarn</name></pref>
<pref><name>capability.policy.mailnews.Window.name.set</name></pref>
<pref><name>security.enable_tls</name></pref>
<pref><name>dom.disable_window_open_feature.menubar</name></pref>
<pref><name>xpinstall.whitelist.add</name></pref>
<pref><name>sessionsaver.settings.nofx</name></pref>
<pref><name>font.name.serif.ar</name></pref>
<pref><name>network.http.max-connections</name></pref>
<pref><name>browser.fixup.alternate.prefix</name></pref>
<pref><name>privacy.item.formdata</name></pref>
<pref><name>network.dns.disableIPv6</name></pref>
<pref><name>network.protocol-handler.external.disks</name></pref>
<pref><name>dom.disable_window_open_feature.status</name></pref>
<pref><name>javascript.enabled</name></pref>
<pref><name>prefs.converted-to-utf8</name></pref>
<pref><name>capability.policy.mailnews.SOAPEncoding.getExternalSchemaURI</name></pref>
<pref><name>network.proxy.socks_remote_dns</name></pref>
<pref><name>capability.policy.mailnews.HTMLDocument.domain</name></pref>
<pref><name>font.name-list.monospace.zh-CN</name></pref>
<pref><name>font.default.zh-TW</name></pref>
<pref><name>capability.policy.mailnews.Window.resizeBy</name></pref>
<pref><name>browser.tabs.loadDivertedInBackground</name></pref>
<pref><name>app.update.interval</name></pref>
<pref><name>browser.related.provider</name></pref>
<pref><name>profile.allow_automigration</name></pref>
<pref><name>browser.search.basic.min_ver</name></pref>
<pref><name>network.proxy.ssl</name></pref>
<pref><name>security.xpconnect.plugin.unrestricted</name></pref>
<pref><name>middlemouse.openNewWindow</name></pref>
<pref><name>dom.disable_open_click_delay</name></pref>
<pref><name>network.enablePad</name></pref>
<pref><name>font.name.serif.x-baltic</name></pref>
<pref><name>privacy.popups.disable_from_plugins</name></pref>
<pref><name>font.name-list.monospace.x-guru</name></pref>
<pref><name>security.ssl3.rsa_aes_128_sha</name></pref>
<pref><name>capability.policy.mailnews.Window.innerWidth.set</name></pref>
<pref><name>security.enable_ssl2</name></pref>
<pref><name>font.name.monospace.th</name></pref>
<pref><name>capability.policy.mailnews.WebServiceProxyFactory.onError</name></pref>
<pref><name>network.protocol-handler.expose.mailto</name></pref>
<pref><name>font.default.el</name></pref>
<pref><name>network.http.default-socket-type</name></pref>
<pref><name>browser.display.focus_background_color</name></pref>
<pref><name>editor.use_custom_colors</name></pref>
<pref><name>network.proxy.gopher</name></pref>
<pref><name>ui.key.saveLink.shift</name></pref>
<pref><name>font.name.serif.ko</name></pref>
<pref><name>font.name.sans-serif.th</name></pref>
<pref><name>capability.policy.mailnews.*.substringData.get</name></pref>
<pref><name>font.name.cursive.x-central-euro</name></pref>
<pref><name>browser.chrome.favicons</name></pref>
<pref><name>font.size.variable.ar</name></pref>
<pref><name>accessibility.typeaheadfind.autostart</name></pref>
<pref><name>font.default.ar</name></pref>
<pref><name>capability.policy.mailnews.SOAPFault.faultCode</name></pref>
<pref><name>font.name.serif.th</name></pref>
<pref><name>security.ssl3.dhe_rsa_aes_256_sha</name></pref>
<pref><name>privacy.popups.policy</name></pref>
<pref><name>font.name.monospace.he</name></pref>
<pref><name>font.name.sans-serif.x-gujr</name></pref>
<pref><name>browser.anchor_color</name></pref>
<pref><name>network.http.keep-alive.timeout</name></pref>
<pref><name>network.IDN.whitelist.cl</name></pref>
<pref><name>browser.display.focus_text_color</name></pref>
<pref><name>accessibility.typeaheadfind.linksonly</name></pref>
<pref><name>mousewheel.withaltkey.numlines</name></pref>
<pref><name>capability.policy.mailnews.Window.focus</name></pref>
<pref><name>intl.content.langcode</name></pref>
<pref><name>browser.helperApps.neverAsk.saveToDisk</name></pref>
<pref><name>browser.throbber.url</name></pref>
<pref><name>intl.menuitems.alwaysappendaccesskeys</name></pref>
<pref><name>font.size.fixed.x-armn</name></pref>
<pref><name>font.name.monospace.x-geor</name></pref>
<pref><name>accessibility.typeaheadfind.flashBar</name></pref>
<pref><name>font.name.monospace.x-devanagari</name></pref>
<pref><name>font.name.serif.x-geor</name></pref>
<pref><name>network.IDN.whitelist.ac</name></pref>
<pref><name>browser.related.autoload</name></pref>
<pref><name>intl.charsetmenu.browser.more3</name></pref>
<pref><name>font.name.monospace.x-baltic</name></pref>
<pref><name>browser.download.manager.useWindow</name></pref>
<pref><name>font.size.fixed.x-devanagari</name></pref>
<pref><name>font.name-list.sans-serif.ja</name></pref>
<pref><name>browser.search.order.1</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.responseXML</name></pref>
<pref><name>font.name.serif.x-beng</name></pref>
<pref><name>font.size.variable.th</name></pref>
<pref><name>network.http.use-cache</name></pref>
<pref><name>font.name.serif.zh-HK</name></pref>
<pref><name>security.ssl3.rsa_null_md5</name></pref>
<pref><name>capability.policy.default.Window.blur.get</name></pref>
<pref><name>extensions.lastAppVersion</name></pref>
<pref><name>font.name.monospace.ar</name></pref>
<pref><name>capability.policy.mailnews.SOAPParameter</name></pref>
<pref><name>accessibility.accesskeycausesactivation</name></pref>
<pref><name>security.warn_leaving_secure.show_once</name></pref>
<pref><name>network.cookie.lifetimePolicy</name></pref>
<pref><name>bidi.numeral</name></pref>
<pref><name>capability.policy.default.History.toString</name></pref>
<pref><name>view_source.syntax_highlight</name></pref>
<pref><name>capability.principal.codebase.p0.granted</name></pref>
<pref><name>font.name-list.monospace.x-ethi</name></pref>
<pref><name>network.http.proxy.version</name></pref>
<pref><name>converter.html2txt.structs</name></pref>
<pref><name>accessibility.usetexttospeech</name></pref>
<pref><name>capability.policy.default.Navigator.preferenceinternal.get</name></pref>
<pref><name>font.size.fixed.x-cyrillic</name></pref>
<pref><name>capability.policy.default.Window.history</name></pref>
<pref><name>bidi.direction</name></pref>
<pref><name>capability.policy.mailnews.*.attributes.get</name></pref>
<pref><name>sessionsaver.settings.sync.machineid</name></pref>
<pref><name>capability.policy.mailnews.XMLHttpRequest.setRequestHeader</name></pref>
<pref><name>app.update.enabled</name></pref>
<pref><name>network.IDN.whitelist.at</name></pref>
<pref><name>accessibility.typeaheadfind.enabletimeout</name></pref>
<pref><name>browser.display.use_document_fonts</name></pref>
<pref><name>font.name.sans-serif.zh-CN</name></pref>
<pref><name>browser.startup.homepage_override.mstone</name></pref>
<pref><name>profile.migration_directory</name></pref>
<pref><name>font.name-list.serif.ja</name></pref>
<pref><name>mousewheel.withnokey.action</name></pref>
<pref><name>network.http.accept-encoding</name></pref>
<pref><name>capability.policy.default.Window.length</name></pref>
<pref><name>font.default.x-mlym</name></pref>
<pref><name>network.standard-url.escape-utf8</name></pref>
<pref><name>network.standard-url.encode-utf8</name></pref>
<pref><name>network.IDN.whitelist.info</name></pref>
<pref><name>font.name.monospace.x-armn</name></pref>
<pref><name>keyword.enabled</name></pref>
<pref><name>capability.policy.default.History.forward.get</name></pref>
</prefs>;
var i = 0;
for each (var pref in xml.pref) {
printStatus(pref.name + ": " + xml.pref.(name == pref.name).length());
}
TEST(1, expect, actual);
END();

View File

@ -1,36 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Regression - appending elements crashes mozilla";
var BUGNUMBER = 309897;
var actual = "No Crash";
var expect = "No Crash";
printBugNumber(BUGNUMBER);
START(summary);
function crash()
{
try
{
var top = <top/>;
for (var i = 0; i < 1000; i++)
{
top.stuff += <stuff>stuff</stuff>;
}
}
catch(e)
{
printStatus("Exception: " + e);
}
}
crash();
TEST(1, expect, actual);
END();

View File

@ -1,29 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Regression - properly root stack in toXMLString";
var BUGNUMBER = 311580;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
// Not a performance problem.
var xmlOl = new XML('<ol><li>Item 1<\/li><li>Item 2<\/li><\/ol>');
var list = xmlOl.li;
for(i = 0; i < 30000; i++)
{
list[i+2] = "Item " + (i+3); // This code is slow.
}
var s = xmlOl.toXMLString();
TEST(1, expect, actual);
END();

View File

@ -1,21 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'Do not crash on XMLListInitializer.child(0)';
var BUGNUMBER = 313799;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var val = <><t/></>.child(0);
TEST(1, expect, actual);
TEST(2, 'xml', typeof val);
END();

View File

@ -1,76 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = 'E4X - Do not crash on XML initializer <b{b}>';
var BUGNUMBER = 318922;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var a, b, x;
printStatus('b=2;a=<a><b{b}>x</b{b}></a>');
b=2;
a=<a><b{b}>x</b{b}></a>;
TEST(1, expect, actual);
printStatus('b="c"; a=<a><b {b}="c">x</b></a>; ');
b="c";
a=<a><b {b}="c">x</b></a>;
TEST(2, expect, actual);
try
{
a='';
b='"';
eval('a=<a><b c={b}x">x</b></a>');
}
catch(e)
{
printStatus(e);
}
TEST(3, expect, actual);
try
{
a='';
b='"';
eval('a=<a><b c="x{b}>x</b></a>');
}
catch(e)
{
printStatus(e);
}
TEST(4, expect, actual);
try
{
a='';
b='x';
eval('a=<a><b c={b}"x">x</b></a>');
}
catch(e)
{
printStatus(e);
}
TEST(5, expect, actual);
try
{
a='';
b='x';
eval('a=<a><b c="x"{b}>x</b></a>');
}
catch(e)
{
printStatus(e);
}
TEST(6, expect, actual);
END();

View File

@ -1,43 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true) skip -- slow
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER = 319872;
var summary = 'Do not Crash in jsxml.c';
var actual = 'No Crash';
var expect = /(No Crash|InternalError: allocation size overflow)/;
printBugNumber(BUGNUMBER);
START(summary);
printStatus ("Expect either no error or out of memory");
expectExitCode(0);
expectExitCode(5);
try
{
var i,m,str;
str="<a xmlns:v=\"";
m="";
for (i=0;i<(1024*1024)/2;i++)
m += "\n";
for(i=0;i<500;i++)
str += m ;
str += "\">f00k</a>";
var xx = new XML(str);
printStatus(xx.toXMLString());
}
catch(ex)
{
actual = ex + '';
print(actual);
}
reportMatch(expect, actual, summary);

View File

@ -1,40 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Do not define AnyName";
var BUGNUMBER = 322499;
var actual = '';
var expect = '';
printBugNumber(BUGNUMBER);
START(summary);
expect = 'ReferenceError';
try
{
AnyName;
}
catch(ex)
{
actual = ex.name;
}
TEST(1, expect, actual);
try
{
*;
}
catch(ex)
{
actual = ex.name;
}
TEST(2, expect, actual);
END();

View File

@ -1,43 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Do not crash when qn->uri is null";
var BUGNUMBER = 323338;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
testFunc();
testFunc();
function testFunc()
{
var htmlXML =
<html>
<body>
<div>
<div id="summary" />
<div id="desc" />
</div>
</body>
</html>;
var childs = htmlXML.children();
var el = htmlXML.body.div..div.(function::attribute('id') == 'summary');
el.div += <div>
<strong>Prototype:</strong>
Test
<br />
</div>;
}
TEST(1, expect, actual);
END();

View File

@ -1,20 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Do not crash when qn->uri is null";
var BUGNUMBER = 323338;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
<x/>.(function::children());
TEST(1, expect, actual);
END();

View File

@ -1,28 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var BUGNUMBER = 325425;
var summary = 'jsxml.c: Bad assumptions about js_ConstructObject';
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
try
{
QName = function() { };
<xml/>.elements("");
}
catch(ex)
{
printStatus(ex + '');
}
TEST(1, expect, actual);
END();

View File

@ -1,41 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Hang due to cycle in XML object";
var BUGNUMBER = 327564;
printBugNumber(BUGNUMBER);
START(summary);
var p = <p/>;
p.c = 1;
var c = p.c[0];
p.insertChildBefore(null,c);
printStatus(p.toXMLString());
printStatus('p.c[1] === c');
TEST(1, true, p.c[1] === c);
p.c = 2
try
{
c.appendChild(p)
// iloop here
}
catch(ex)
{
actual = ex instanceof Error;
}
TEST(2, true, actual);
END();

View File

@ -1,27 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Do not crash in js_IsXMLName";
var BUGNUMBER = 327691;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var A=<y/>;
var B=A.h;
var D=B.h;
B.h=D.h;
B[0]=B.h;
B.h=D.h; // Crashes at js_IsXMLName.
TEST(1, expect, actual);
END();

View File

@ -1,27 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Do not crash during gc()";
var BUGNUMBER = 327691;
var actual = 'No Crash';
var expect = 'No Crash';
printBugNumber(BUGNUMBER);
START(summary);
var A=<y/>;
var B=A.h;
var D=B.h;
B.h=D.h;
B[0]=B.h;
gc();
TEST(1, expect, actual);
END();

View File

@ -1,48 +0,0 @@
// |reftest| pref(javascript.options.xml.content,true)
/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var summary = "Make XPConnect refuse to wrap e4x";
var BUGNUMBER = 327697;
var actual = 'No Hang';
var expect = 'No Hang';
printBugNumber(BUGNUMBER);
START(summary);
printStatus('This test runs in the browser only');
function init()
{
try
{
var sel = document.getElementsByTagName("select")[0];
sel.add(document.createElement('foo'), <bar/>);
}
catch(ex)
{
printStatus(ex + '');
}
TEST(1, expect, actual);
END();
gDelayTestDriverEnd = false;
jsTestDriverEnd();
}
if (typeof window != 'undefined')
{
// delay test driver end
gDelayTestDriverEnd = true;
document.write('<select></select>');
window.addEventListener("load", init, false);
}
else
{
TEST(1, expect, actual);
END();
}

Some files were not shown because too many files have changed in this diff Show More