Index: level1/core/alltests.xml
===================================================================
retrieving revision 1.18
diff -u -r1.18 alltests.xml
--- level1/core/alltests.xml 28 Jan 2004 23:46:02 -0000 1.18
+++ level1/core/alltests.xml 9 Feb 2004 18:39:05 -0000
@@ -408,7 +408,6 @@
-
Index: level1/core/hc_attrcreatedocumentfragment.xml
===================================================================
retrieving revision 1.4
diff -u -r1.4 hc_attrcreatedocumentfragment.xml
--- level1/core/hc_attrcreatedocumentfragment.xml 28 Jun 2003 21:10:59 -0000 1.4
+++ level1/core/hc_attrcreatedocumentfragment.xml 9 Feb 2004 18:39:05 -0000
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
+
+
Index: level1/core/hc_documentcreateattribute.xml
===================================================================
retrieving revision 1.4
diff -u -r1.4 hc_documentcreateattribute.xml
--- level1/core/hc_documentcreateattribute.xml 28 Jun 2003 19:02:37 -0000 1.4
+++ level1/core/hc_documentcreateattribute.xml 9 Feb 2004 18:39:05 -0000
@@ -1,6 +1,6 @@
-
-
-
-hc_namednodemapinvalidtype1
-Curt Arnold
-
-Attempt to insert an element into an attribute list,
-should raise a HIERARCHY_REQUEST_ERR.
-
-
-2004-01-09
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level1/core/hc_namednodemapnumberofnodes.xml
===================================================================
retrieving revision 1.4
diff -u -r1.4 hc_namednodemapnumberofnodes.xml
--- level1/core/hc_namednodemapnumberofnodes.xml 12 Nov 2003 06:59:02 -0000 1.4
+++ level1/core/hc_namednodemapnumberofnodes.xml 9 Feb 2004 18:39:05 -0000
@@ -1,6 +1,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level1/core/readonly.xml
===================================================================
diff -N level1/core/readonly.xml
--- level1/core/readonly.xml 21 Oct 2001 20:59:41 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,137 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
Index: level1/core/svg_alltests.xml
===================================================================
diff -N level1/core/svg_alltests.xml
--- level1/core/svg_alltests.xml 14 Mar 2002 07:15:02 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-
-
-
-
-
-
Index: level1/core/xml_alltests.xml
===================================================================
diff -N level1/core/xml_alltests.xml
--- level1/core/xml_alltests.xml 10 Dec 2001 05:37:22 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-
-
-
-
-
-
Index: level2/core/alltests.xml
===================================================================
retrieving revision 1.9
diff -u -r1.9 alltests.xml
--- level2/core/alltests.xml 13 Jan 2004 05:32:53 -0000 1.9
+++ level2/core/alltests.xml 9 Feb 2004 18:39:07 -0000
@@ -1,6 +1,6 @@
-
-
-
-hc_attrCreateDocumentFragment
-Curt Arnold
-
- Attr nodes may be associated with Element nodes contained within a DocumentFragment.
- Create a new DocumentFragment and add a newly created Element node(with one attribute).
- Once the element is added, its attribute should be available as an attribute associated
- with an Element within a DocumentFragment.
-
-
-2002-06-09
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/hc_attrname.xml
===================================================================
diff -N level2/core/hc_attrname.xml
--- level2/core/hc_attrname.xml 27 Jun 2003 18:08:13 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,53 +0,0 @@
-
-
-
-
-
-hc_attrName
-Curt Arnold
-
- The getNodeName() method of an Attribute node.
- Retrieve the attribute named street from the last
- child of of the second employee and examine its
- NodeName. This test uses the getNamedItem(name) method from the NamedNodeMap
- interface.
-
- Unlike the DOM 1 Core equivalent, this test can expect the
- attribute name to be upper case for HTML documents.
-
-
-2003-06-27
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/hc_documentcreateattribute.xml
===================================================================
diff -N level2/core/hc_documentcreateattribute.xml
--- level2/core/hc_documentcreateattribute.xml 27 Jun 2003 06:52:37 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-
-
-
-
-
-hc_documentCreateAttribute
-Curt Arnold
-
- The "createAttribute(name)" method creates an Attribute
- node of the given name.
-
- Retrieve the entire DOM document and invoke its
- "createAttribute(name)" method. It should create a
- new Attribute node with the given name. The name, value
- and type of the newly created object are retrieved and
- output.
-
- Unlike the DOM 1 Core equivalent, this test can expect the
- attribute name to be upper case for HTML documents.
-
-
-2003-06-27
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/hc_elementgetattributenode.xml
===================================================================
diff -N level2/core/hc_elementgetattributenode.xml
--- level2/core/hc_elementgetattributenode.xml 27 Jun 2003 18:08:13 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-
-
-
-
-
-hc_elementGetAttributeNode
-Curt Arnold
-
- The "getAttributeNode(name)" method retrieves an
- attribute node by name.
-
- Retrieve the attribute "domestic" from the last child
- of the first employee. Since the method returns an
- Attr object, the "strong" can be examined to ensure the
- proper attribute was retrieved.
-
- Unlike the DOM 1 Core equivalent, this test can expect the
- attribute name to be upper case for HTML documents.
-
-
-
-2003-06-27
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/hc_namednodemapgetnameditem.xml
===================================================================
diff -N level2/core/hc_namednodemapgetnameditem.xml
--- level2/core/hc_namednodemapgetnameditem.xml 27 Jun 2003 18:08:13 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,51 +0,0 @@
-
-
-
-
-
-hc_namednodemapGetNamedItem
-Curt Arnold
-
- The "getNamedItem(name)" method retrieves a node
- specified by name.
-
- Retrieve the second employee and create a NamedNodeMap
- listing of the attributes of the last child. Once the
- list is created an invocation of the "getNamedItem(name)"
- method is done with name="domestic". This should result
- in the domestic Attr node being returned.
-
- Unlike the DOM 1 Core equivalent, this test can expect the
- attribute name to be upper case for HTML documents.
-
-
-2003-06-27
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/ibmtests.xml
===================================================================
diff -N level2/core/ibmtests.xml
--- level2/core/ibmtests.xml 25 Jan 2003 16:20:20 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: level2/core/svg_alltests.xml
===================================================================
diff -N level2/core/svg_alltests.xml
--- level2/core/svg_alltests.xml 30 Jun 2003 03:49:44 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-
-
-
-
-
-
Index: level2/core/xml_alltests.xml
===================================================================
diff -N level2/core/xml_alltests.xml
--- level2/core/xml_alltests.xml 4 Dec 2002 00:42:47 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-
-
-
-
-
-
Index: tests/level1/core/files/hc_documentcreateattribute.xml
===================================================================
RCS file: tests/level1/core/files/hc_documentcreateattribute.xml
diff -N tests/level1/core/files/hc_documentcreateattribute.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/level1/core/files/hc_documentcreateattribute.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,50 @@
+
+
+
+
+
+hc_documentCreateAttribute
+Curt Arnold
+
+ The "createAttribute(name)" method creates an Attribute
+ node of the given name.
+
+ Retrieve the entire DOM document and invoke its
+ "createAttribute(name)" method. It should create a
+ new Attribute node with the given name. The name, value
+ and type of the newly created object are retrieved and
+ output.
+
+ Unlike the DOM 1 Core equivalent, this test can expect the
+ attribute name to be upper case for HTML documents.
+
+
+2003-06-27
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: tests/level2/core/hc_namednodemapinvalidtype1.xml
===================================================================
RCS file: tests/level2/core/hc_namednodemapinvalidtype1.xml
diff -N tests/level2/core/hc_namednodemapinvalidtype1.xml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/level2/core/hc_namednodemapinvalidtype1.xml 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,42 @@
+
+
+
+
+
+hc_namednodemapinvalidtype1
+Curt Arnold
+
+Attempt to insert an element into an attribute list,
+should raise a HIERARCHY_REQUEST_ERR.
+
+
+2004-01-09
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ReadMe.txt
===================================================================
diff -N ReadMe.txt
--- ReadMe.txt 18 Jan 2002 16:18:06 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-This document is out of date, please consult the relevant Build
-instructions at http://www.w3.org/DOM/Test/Documents/DOMTSBuild.html
-
-----
-
-Please do NOT download files from the CVS repository, instead refer to the
-build instructions, pointer given above.
-
-Files that are not build in accordance with those instructions cannot be
-considered valid.
-
-/Dimitris Dimitriadis, W3C DOM WG
Index: ecmascript/DOMTestCase.js
===================================================================
retrieving revision 1.31
diff -u -r1.31 DOMTestCase.js
--- ecmascript/DOMTestCase.js 28 Jan 2004 23:22:53 -0000 1.31
+++ ecmascript/DOMTestCase.js 9 Feb 2004 19:18:40 -0000
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2001-2003 World Wide Web Consortium,
+Copyright (c) 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, Institut National de
Recherche en Informatique et en Automatique, Keio University). All
Rights Reserved. This program is distributed under the W3C's Software
@@ -15,7 +15,62 @@
assertEquals(descr, expected, actualSize);
}
+ function assertEqualsAutoCase(context, descr, expected, actual) {
+ if (builder.contentType == "text/html") {
+ if(context == "attribute") {
+ assertEquals(descr, expected.toLowerCase(), actual.toLowerCase());
+ } else {
+ assertEquals(descr, expected.toUpperCase(), actual);
+ }
+ } else {
+ assertEquals(descr, expected, actual);
+ }
+ }
+
+ function assertEqualsCollectionAutoCase(context, descr, expected, actual) {
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+
+ //
+ // if there length is the same, then every entry in the expected list
+ // must appear once and only once in the actual list
+ var expectedLen = expected.length;
+ var expectedValue;
+ var actualLen = actual.length;
+ var i;
+ var j;
+ var matches;
+ for(i = 0; i < expectedLen; i++) {
+ matches = 0;
+ expectedValue = expected[i];
+ for(j = 0; j < actualLen; j++) {
+ if (builder.contentType == "text/html") {
+ if (context == "attribute") {
+ if (expectedValue.toLowerCase() == actual[j].toLowerCase()) {
+ matches++;
+ }
+ } else {
+ if (expectedValue.toUpperCase() == actual[j]) {
+ matches++;
+ }
+ }
+ } else {
+ if(expectedValue == actual[j]) {
+ matches++;
+ }
+ }
+ }
+ if(matches == 0) {
+ assert(descr + ": No match found for " + expectedValue,false);
+ }
+ if(matches > 1) {
+ assert(descr + ": Multiple matches found for " + expectedValue, false);
+ }
+ }
+ }
+
function assertEqualsCollection(descr, expected, actual) {
//
// if they aren't the same size, they aren't equal
@@ -47,6 +102,21 @@
}
+ function assertEqualsListAutoCase(context, descr, expected, actual) {
+ var minLength = expected.length;
+ if (actual.length < minLength) {
+ minLength = actual.length;
+ }
+ //
+ for(var i = 0; i < minLength; i++) {
+ assertEqualsAutoCase(context, descr, expected[i], actual[i]);
+ }
+ //
+ // if they aren't the same size, they aren't equal
+ assertEquals(descr, expected.length, actual.length);
+ }
+
+
function assertEqualsList(descr, expected, actual) {
var minLength = expected.length;
if (actual.length < minLength) {
Index: java/org/w3c/domts/DOMTestCase.java
===================================================================
retrieving revision 1.17
diff -u -r1.17 DOMTestCase.java
--- java/org/w3c/domts/DOMTestCase.java 6 Jan 2004 16:45:42 -0000 1.17
+++ java/org/w3c/domts/DOMTestCase.java 9 Feb 2004 19:18:41 -0000
@@ -63,6 +63,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.Iterator;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.NodeList;
@@ -375,6 +376,114 @@
}
/**
+ * Asserts that expected.equalsIgnoreCase(actual) is true
+ *
+ * @param assertID
+ * identifier of assertion
+ * @param actual
+ * actual value
+ * @param expected
+ * Expected value, may not be null.
+ */
+ public void assertEqualsAutoCase(
+ String context,
+ String assertID,
+ String expected,
+ String actual) {
+ String contentType = getContentType();
+ //
+ // if the content type is HTML (not XHTML)
+ //
+ if ("text/html".equals(contentType)) {
+ //
+ // if the context is attribute, then use case-insentive comparison
+ //
+ if ("attribute".equals(context)) {
+ framework.assertEqualsIgnoreCase(this, assertID, expected, actual);
+ } else {
+ //
+ // otherwise should be compared against uppercased expectation
+ framework.assertEquals(this, assertID, expected.toUpperCase(), actual);
+ }
+ } else {
+ framework.assertEquals(this, assertID, expected, actual);
+ }
+ }
+
+
+ /**
+ * Creates an equivalent list where every member has
+ * been uppercased
+ *
+ */
+ private List toUpperCase(Collection expected) {
+ List upperd = new ArrayList(expected.size());
+ Iterator iter = expected.iterator();
+ while(iter.hasNext()) {
+ upperd.add(iter.next().toString().toUpperCase());
+ }
+ return upperd;
+ }
+ /**
+ * Asserts that each entry in actual is matched with an entry in expected
+ * that only differs by case. Order is not significant.
+ *
+ * @param assertID
+ * identifier of assertion
+ * @param actual
+ * actual value
+ * @param expected
+ * Expected value, may not be null.
+ */
+ public void assertEqualAutoCase(
+ String context,
+ String assertID,
+ Collection expected,
+ Collection actual) {
+ String contentType = getContentType();
+ if ("text/html".equals(contentType)) {
+ if ("attribute".equals(context)) {
+ assertEqualsIgnoreCase(assertID, expected, actual);
+ } else {
+ framework.assertEquals(this, assertID, toUpperCase(expected), actual);
+ }
+
+ } else {
+ framework.assertEquals(this, assertID, expected, actual);
+ }
+ }
+
+ /**
+ * Asserts that each entry in actual is matched with an entry in expected
+ * that only differs by case. Order is significant.
+ *
+ * @param assertID
+ * identifier of assertion
+ * @param actual
+ * actual value
+ * @param expected
+ * Expected value, may not be null.
+ */
+ public void assertEqualsAutoCase(
+ String context,
+ String assertID,
+ List expected,
+ List actual) {
+ String contentType = getContentType();
+ if ("text/html".equals(contentType)) {
+ if ("attribute".equals(context)) {
+ assertEqualsIgnoreCase(assertID, expected, actual);
+ } else {
+ framework.assertEquals(this, assertID, toUpperCase(expected), actual);
+ }
+
+ } else {
+ framework.assertEquals(this, assertID, expected, actual);
+ }
+ }
+
+
+ /**
* Asserts that expected.equals(actual) is true
*
* @param assertID
@@ -492,6 +601,32 @@
}
/**
+ * Asserts that expected.equalsIgnoreCase(actual) is false
+ *
+ * @param assertID
+ * identifier of assertion
+ * @param actual
+ * actual value
+ * @param expected
+ * Expected value, may not be null.
+ */
+ public void assertNotEqualsAutoCase(
+ String context,
+ String assertID,
+ String expected,
+ String actual) {
+ String contentType = getContentType();
+ if ("text/html".equals(contentType)) {
+ if ("attribute".equals(context)) {
+ framework.assertNotEqualsIgnoreCase(this, assertID, expected, actual);
+ } else {
+ framework.assertNotEquals(this, assertID, expected.toUpperCase(), actual);
+ }
+ }
+ framework.assertNotEquals(this, assertID, expected, actual);
+ }
+
+ /**
* Asserts that values of expected and actual are not equal.
*
* @param assertID
@@ -718,6 +853,67 @@
}
/**
+ * Compares the value of actual and expected ignoring case.
+ *
+ * @param expected
+ * expected
+ * @param actual
+ * actual
+ * @return true if actual and expected are equal ignoring case.
+ */
+ public boolean equalsAutoCase(String context,String expected, String actual) {
+ if ("text/html".equals(getContentType())) {
+ if ("attribute".equals(context)) {
+ return framework.equalsIgnoreCase(expected, actual);
+ } else {
+ return framework.equals(expected.toUpperCase(), actual);
+ }
+ }
+ return framework.equals(expected, actual);
+ }
+
+ /**
+ * Compares the values in actual and expected ignoring case and order.
+ *
+ * @param expected
+ * expected
+ * @param actual
+ * actual
+ * @return true if actual and expected are equal ignoring case.
+ */
+ public boolean equalsAutoCase(String context, Collection expected, Collection actual) {
+ if ("text/html".equals(getContentType())) {
+ if ("attribute".equals(context)) {
+ return framework.equalsIgnoreCase(expected, actual);
+ } else {
+ return framework.equals(toUpperCase(expected), actual);
+ }
+ }
+ return framework.equals(expected, actual);
+ }
+
+ /**
+ * Compares the values in actual and expected ignoring case.
+ *
+ * @param expected
+ * expected
+ * @param actual
+ * actual
+ * @return true if actual and expected are equal ignoring case.
+ */
+ public boolean equalsAutoCase(String context, List expected, List actual) {
+ if ("text/html".equals(getContentType())) {
+ if ("attribute".equals(context)) {
+ return framework.equalsIgnoreCase(expected, actual);
+ } else {
+ return framework.equals(toUpperCase(expected), actual);
+ }
+ }
+ return framework.equals(expected, actual);
+ }
+
+
+ /**
* Compares the values of actual and expected.
*
* @param expected