You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2014/06/28 15:39:06 UTC

svn commit: r1606351 [3/3] - in /webservices/axiom/trunk: modules/axiom-dom/src/test/java/org/apache/axiom/om/impl/dom/ testsuites/dom-testsuite/ testsuites/dom-testsuite/etc/ testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/ testsuites/d...

Modified: webservices/axiom/trunk/testsuites/dom-testsuite/etc/w3c-excludelist.xsl
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/etc/w3c-excludelist.xsl?rev=1606351&r1=1606350&r2=1606351&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/etc/w3c-excludelist.xsl (original)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/etc/w3c-excludelist.xsl Sat Jun 28 13:39:05 2014
@@ -23,28 +23,10 @@
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
-    <xsl:template name="substring-after-last">
-        <xsl:param name="string"/>
-        <xsl:param name="delimiter"/>
-        <xsl:choose>
-            <xsl:when test="contains($string, $delimiter)">
-                <xsl:call-template name="substring-after-last">
-                    <xsl:with-param name="string" select="substring-after($string, $delimiter)"/>
-                    <xsl:with-param name="delimiter" select="$delimiter"/>
-                </xsl:call-template>
-            </xsl:when>
-            <xsl:otherwise><xsl:value-of select="$string"/></xsl:otherwise>
-        </xsl:choose>
-    </xsl:template>
     <xsl:template match="/">
-        <xsl:apply-templates select="//testcase[failure or error]"/>
+        <xsl:apply-templates select="//testcase[@classname='org.apache.axiom.ts.dom.W3CTestCase' and (failure or error)]"/>
     </xsl:template>
     <xsl:template match="testcase">
-        <xsl:text>        suite.addExclude(</xsl:text>
-        <xsl:call-template name="substring-after-last">
-            <xsl:with-param name="string" select="@name"/>
-            <xsl:with-param name="delimiter" select="'/'"/>
-        </xsl:call-template>
-        <xsl:text>.class);&#10;</xsl:text>
+        <xsl:text>        builder.exclude(W3CTestCase.class, "(id=</xsl:text><xsl:value-of select="substring-before(substring-after(@name, '[id='), ']')"/><xsl:text>)");&#10;</xsl:text>
     </xsl:template>
 </xsl:stylesheet>
\ No newline at end of file

Modified: webservices/axiom/trunk/testsuites/dom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/pom.xml?rev=1606351&r1=1606350&r2=1606351&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/pom.xml (original)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/pom.xml Sat Jun 28 13:39:05 2014
@@ -120,9 +120,6 @@
                                         <include name="org/w3c/domts/DOMTestInnerClass.java"/>
                                         <include name="org/w3c/domts/DOMTestSink.java"/>
                                         <include name="org/w3c/domts/DOMTestSuite.java"/>
-                                        <include name="org/w3c/domts/JAXPDOMTestDocumentBuilderFactory.java"/>
-                                        <include name="org/w3c/domts/JUnitTestCaseAdapter.java"/>
-                                        <include name="org/w3c/domts/JUnitTestSuiteAdapter.java"/>
                                         <include name="org/w3c/domts/UserDataMonitor.java"/>
                                         <include name="org/w3c/domts/UserDataNotification.java"/>
                                         <include name="org/w3c/domts/level?/core/*.java"/>

Added: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestDocumentBuilderFactoryImpl.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestDocumentBuilderFactoryImpl.java?rev=1606351&view=auto
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestDocumentBuilderFactoryImpl.java (added)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestDocumentBuilderFactoryImpl.java Sat Jun 28 13:39:05 2014
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.dom;
+
+import java.net.URL;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.domts.DOMTestDocumentBuilderFactory;
+import org.w3c.domts.DOMTestIncompatibleException;
+import org.w3c.domts.DOMTestLoadException;
+import org.w3c.domts.DocumentBuilderSetting;
+
+final class DOMTestDocumentBuilderFactoryImpl extends DOMTestDocumentBuilderFactory {
+    private final DocumentBuilderFactoryFactory dbff;
+    private final DocumentBuilderFactory dbf;
+    private final DocumentBuilder builder;
+
+    public DOMTestDocumentBuilderFactoryImpl(DocumentBuilderFactoryFactory dbff, DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException {
+        super(settings);
+        this.dbff = dbff;
+        dbf = dbff.newInstance();
+        for (DocumentBuilderSetting setting : settings) {
+            setting.applySetting(dbf);
+        }
+        try {
+            builder = dbf.newDocumentBuilder();
+        } catch (ParserConfigurationException ex) {
+            throw new DOMTestIncompatibleException(ex, null);
+        }
+    }
+
+    @Override
+    public DOMTestDocumentBuilderFactory newInstance(DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException {
+        return new DOMTestDocumentBuilderFactoryImpl(dbff, mergeSettings(settings));
+    }
+
+    @Override
+    public DOMImplementation getDOMImplementation() {
+        return builder.getDOMImplementation();
+    }
+
+    @Override
+    public boolean hasFeature(String feature, String version) {
+        return builder.getDOMImplementation().hasFeature(feature, version);
+    }
+
+    @Override
+    public Document load(URL url) throws DOMTestLoadException {
+        try {
+            return builder.parse(url.openStream(), url.toString());
+        } catch (Exception ex) {
+            throw new DOMTestLoadException(ex);
+        }
+    }
+
+    @Override
+    public boolean isCoalescing() {
+        return dbf.isCoalescing();
+    }
+
+    @Override
+    public boolean isExpandEntityReferences() {
+        return dbf.isExpandEntityReferences();
+    }
+
+    @Override
+    public boolean isIgnoringElementContentWhitespace() {
+        return dbf.isIgnoringElementContentWhitespace();
+    }
+
+    @Override
+    public boolean isNamespaceAware() {
+        return dbf.isNamespaceAware();
+    }
+
+    @Override
+    public boolean isValidating() {
+        return dbf.isValidating();
+    }
+}

Propchange: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestDocumentBuilderFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java?rev=1606351&r1=1606350&r2=1606351&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java (original)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DOMTestSuiteBuilder.java Sat Jun 28 13:39:05 2014
@@ -18,6 +18,9 @@
  */
 package org.apache.axiom.ts.dom;
 
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
 import javax.xml.XMLConstants;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -25,8 +28,14 @@ import javax.xml.parsers.DocumentBuilder
 import org.apache.axiom.testutils.conformance.ConformanceTestFile;
 import org.apache.axiom.testutils.suite.MatrixTestSuiteBuilder;
 import org.apache.axiom.testutils.suite.XSLTImplementation;
+import org.w3c.domts.DOMTestCase;
+import org.w3c.domts.DOMTestDocumentBuilderFactory;
+import org.w3c.domts.DOMTestIncompatibleException;
+import org.w3c.domts.DOMTestSink;
+import org.w3c.domts.DOMTestSuite;
+import org.w3c.domts.DocumentBuilderSetting;
 
-public class DOMTestSuiteBuilder extends MatrixTestSuiteBuilder {
+public final class DOMTestSuiteBuilder extends MatrixTestSuiteBuilder {
     private static final QName[] validAttrQNames = new QName[] {
         new QName("urn:ns2", "attr", "q"),
         new QName("", "attr", ""),
@@ -41,13 +50,15 @@ public class DOMTestSuiteBuilder extends
         new QName("", XMLConstants.XMLNS_ATTRIBUTE, ""),
     };
     
-    private final DocumentBuilderFactory dbf;
+    private final DocumentBuilderFactoryFactory dbff;
     
-    public DOMTestSuiteBuilder(DocumentBuilderFactory dbf) {
-        this.dbf = dbf;
+    public DOMTestSuiteBuilder(DocumentBuilderFactoryFactory dbff) {
+        this.dbff = dbff;
     }
     
     protected void addTests() {
+        DocumentBuilderFactory dbf = dbff.newInstance();
+        dbf.setNamespaceAware(true);
         ConformanceTestFile[] conformanceFiles = ConformanceTestFile.getConformanceTestFiles();
         addTest(new org.apache.axiom.ts.dom.attr.TestCloneNode(dbf, true));
         addTest(new org.apache.axiom.ts.dom.attr.TestCloneNode(dbf, false));
@@ -172,5 +183,48 @@ public class DOMTestSuiteBuilder extends
         addTest(new org.apache.axiom.ts.dom.text.TestLookupNamespaceURIWithoutParent(dbf));
         addTest(new org.apache.axiom.ts.dom.text.TestSetPrefix(dbf));
         addTest(new org.apache.axiom.ts.dom.text.TestSplitText(dbf));
+        
+        DOMTestDocumentBuilderFactory factory;
+        try {
+            factory = new DOMTestDocumentBuilderFactoryImpl(dbff, new DocumentBuilderSetting[] {
+                    DocumentBuilderSetting.notCoalescing,
+                    DocumentBuilderSetting.notExpandEntityReferences,
+                    DocumentBuilderSetting.notIgnoringElementContentWhitespace,
+                    DocumentBuilderSetting.namespaceAware,
+                    DocumentBuilderSetting.notValidating});
+        } catch (DOMTestIncompatibleException ex) {
+            // TODO
+            throw new Error(ex);
+        }
+        try {
+            addW3CTests(factory, new org.w3c.domts.level1.core.alltests(factory));
+            addW3CTests(factory, new org.w3c.domts.level2.core.alltests(factory));
+            addW3CTests(factory, new org.w3c.domts.level3.core.alltests(factory));
+        } catch (Exception ex) {
+            // TODO
+            throw new Error(ex);
+        }
+    }
+    
+    private void addW3CTests(final DOMTestDocumentBuilderFactory factory, DOMTestSuite suite) {
+        suite.build(new DOMTestSink() {
+            public void addTest(Class testClass) {
+                try {
+                    Constructor<? extends DOMTestCase> testConstructor = ((Class<?>)testClass).asSubclass(DOMTestCase.class).getConstructor(DOMTestDocumentBuilderFactory.class);
+                    DOMTestCase test;
+                    try {
+                        test = testConstructor.newInstance(new Object[] { factory });
+                    } catch (InvocationTargetException ex) {
+                        throw ex.getTargetException();
+                    }
+                    test.setFramework(JUnitTestFramework.INSTANCE);
+                    DOMTestSuiteBuilder.this.addTest(new W3CTestCase(test));
+                }
+                catch (Throwable ex) {
+                    // TODO
+                    throw new Error(ex);
+                }
+            }
+        });
     }
 }

Added: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DocumentBuilderFactoryFactory.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DocumentBuilderFactoryFactory.java?rev=1606351&view=auto
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DocumentBuilderFactoryFactory.java (added)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DocumentBuilderFactoryFactory.java Sat Jun 28 13:39:05 2014
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.dom;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+/**
+ * Creates {@link DocumentBuilderFactory} instances.
+ */
+public interface DocumentBuilderFactoryFactory {
+    DocumentBuilderFactory newInstance();
+}

Propchange: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/DocumentBuilderFactoryFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/JUnitTestFramework.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/JUnitTestFramework.java?rev=1606351&view=auto
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/JUnitTestFramework.java (added)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/JUnitTestFramework.java Sat Jun 28 13:39:05 2014
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.dom;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Locale;
+
+import javax.xml.parsers.DocumentBuilder;
+
+import org.junit.Assert;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.NodeList;
+import org.w3c.domts.DOMTestCase;
+import org.w3c.domts.DOMTestFramework;
+
+final class JUnitTestFramework implements DOMTestFramework {
+    public static final JUnitTestFramework INSTANCE = new JUnitTestFramework();
+    
+    private JUnitTestFramework() {}
+    
+    private static String[] toArray(Collection<String> collection, boolean normalizeCase, boolean sort) {
+        String[] array = new String[collection.size()];
+        int i = 0;
+        for (String item : collection) {
+            array[i++] = normalizeCase ? item.toLowerCase(Locale.ENGLISH) : item;
+        }
+        if (sort) {
+            Arrays.sort(array);
+        }
+        return array;
+    }
+    
+    public boolean hasFeature(DocumentBuilder docBuilder, String feature, String version)  {
+       return docBuilder.getDOMImplementation().hasFeature(feature,version);
+    }
+
+    public void wait(int millisecond) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public void fail(DOMTestCase test, String assertID) {
+        Assert.fail(assertID);
+    }
+
+    public void assertTrue(DOMTestCase test, String assertID, boolean actual) {
+        Assert.assertTrue(assertID, actual);
+    }
+
+    public void assertFalse(DOMTestCase test, String assertID, boolean actual) {
+        Assert.assertFalse(assertID, actual);
+    }
+
+    public void assertNull(DOMTestCase test, String assertID, Object actual) {
+        Assert.assertNull(assertID, actual);
+    }
+
+    public void assertNotNull(DOMTestCase test, String assertID, Object actual) {
+        Assert.assertNotNull(assertID, actual);
+    }
+
+    public void assertSame(DOMTestCase test, String assertID, Object expected, Object actual) {
+        Assert.assertSame(assertID, expected, actual);
+    }
+
+    public void assertInstanceOf(DOMTestCase test, String assertID, Object obj, Class cls) {
+        Assert.assertTrue(assertID, cls.isInstance(obj));
+    }
+
+    public void assertSize(DOMTestCase test, String assertID, int expectedSize, NodeList collection) {
+        Assert.assertEquals(assertID, expectedSize, collection.getLength());
+    }
+
+    public void assertSize(DOMTestCase test, String assertID, int expectedSize, NamedNodeMap collection) {
+        Assert.assertEquals(assertID, expectedSize, collection.getLength());
+    }
+
+    public void assertSize(DOMTestCase test, String assertID, int expectedSize, Collection collection) {
+        Assert.assertEquals(assertID, expectedSize, collection.size());
+    }
+
+    public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, String expected, String actual) {
+        Assert.assertEquals(assertID, expected, actual);
+    }
+
+    public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, Collection expected, Collection actual) {
+        Assert.assertArrayEquals(assertID, toArray(expected, true, true), toArray(actual, true, true));
+    }
+
+    public void assertEqualsIgnoreCase(DOMTestCase test, String assertID, List expected, List actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public void assertEquals(DOMTestCase test, String assertID, String expected, String actual) {
+        Assert.assertEquals(assertID, expected, actual);
+    }
+
+    public void assertEquals(DOMTestCase test, String assertID, int expected, int actual) {
+        Assert.assertEquals(assertID, expected, actual);
+    }
+
+    public void assertEquals(DOMTestCase test, String assertID, boolean expected, boolean actual) {
+        Assert.assertEquals(assertID, expected, actual);
+    }
+
+    public void assertEquals(DOMTestCase test, String assertID, double expected, double actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public void assertEquals(DOMTestCase test, String assertID, Collection expected, Collection actual) {
+        Assert.assertArrayEquals(assertID, toArray(expected, false, true), toArray(actual, false, true));
+    }
+
+    public void assertNotEqualsIgnoreCase(DOMTestCase test, String assertID, String expected, String actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public void assertNotEquals(DOMTestCase test, String assertID, String expected, String actual) {
+        Assert.assertFalse(assertID, expected.equals(actual));
+    }
+
+    public void assertNotEquals(DOMTestCase test, String assertID, int expected, int actual) {
+        Assert.assertFalse(assertID, expected == actual);
+    }
+
+    public void assertNotEquals(DOMTestCase test, String assertID, boolean expected, boolean actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public void assertNotEquals(DOMTestCase test, String assertID, double expected, double actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean same(Object expected, Object actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equalsIgnoreCase(String expected, String actual) {
+        return expected.equalsIgnoreCase(actual);
+    }
+
+    public boolean equalsIgnoreCase(Collection expected, Collection actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equalsIgnoreCase(List expected, List actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equals(String expected, String actual) {
+        return expected.equals(actual);
+    }
+
+    public boolean equals(int expected, int actual) {
+        return expected == actual;
+    }
+
+    public boolean equals(boolean expected, boolean actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equals(double expected, double actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equals(Collection expected, Collection actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean equals(List expected, List actual) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public int size(Collection collection) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public int size(NamedNodeMap collection) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+
+    public int size(NodeList collection) {
+        // TODO
+        throw new UnsupportedOperationException();
+    }
+}

Propchange: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/JUnitTestFramework.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/ResolveURI.aj (from r1606314, webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/w3c/dom/ResolveURI.aj)
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/ResolveURI.aj?p2=webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/ResolveURI.aj&p1=webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/w3c/dom/ResolveURI.aj&r1=1606314&r2=1606351&rev=1606351&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/w3c/dom/ResolveURI.aj (original)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/ResolveURI.aj Sat Jun 28 13:39:05 2014
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.axiom.ts.w3c.dom;
+package org.apache.axiom.ts.dom;
 
 import java.net.URL;
 

Added: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/W3CTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/W3CTestCase.java?rev=1606351&view=auto
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/W3CTestCase.java (added)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/W3CTestCase.java Sat Jun 28 13:39:05 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.axiom.ts.dom;
+
+import org.apache.axiom.testutils.suite.MatrixTestCase;
+import org.w3c.domts.DOMTestCase;
+
+public final class W3CTestCase extends MatrixTestCase {
+    private DOMTestCase test;
+
+    public W3CTestCase(DOMTestCase test) {
+        this.test = test;
+        addTestParameter("id", test.getTargetURI());
+    }
+
+    @Override
+    protected void runTest() throws Throwable {
+        test.runTest();
+        int mutationCount = test.getMutationCount();
+        if (mutationCount != 0) {
+            fail("Document loaded with willBeModified='false' was modified in course of test.");
+        }
+    }
+}

Propchange: webservices/axiom/trunk/testsuites/dom-testsuite/src/main/java/org/apache/axiom/ts/dom/W3CTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/axiom/trunk/testsuites/dom-testsuite/src/test/java/org/apache/axiom/ts/dom/XercesTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testsuites/dom-testsuite/src/test/java/org/apache/axiom/ts/dom/XercesTest.java?rev=1606351&r1=1606350&r2=1606351&view=diff
==============================================================================
--- webservices/axiom/trunk/testsuites/dom-testsuite/src/test/java/org/apache/axiom/ts/dom/XercesTest.java (original)
+++ webservices/axiom/trunk/testsuites/dom-testsuite/src/test/java/org/apache/axiom/ts/dom/XercesTest.java Sat Jun 28 13:39:05 2014
@@ -28,13 +28,60 @@ import org.apache.xerces.jaxp.DocumentBu
 
 public class XercesTest extends TestCase {
     public static TestSuite suite() {
-        DocumentBuilderFactory dbf = new DocumentBuilderFactoryImpl();
-        dbf.setNamespaceAware(true);
-        DOMTestSuiteBuilder builder = new DOMTestSuiteBuilder(dbf);
+        DOMTestSuiteBuilder builder = new DOMTestSuiteBuilder(new DocumentBuilderFactoryFactory() {
+            public DocumentBuilderFactory newInstance() {
+                return new DocumentBuilderFactoryImpl();
+            }
+        });
         
         // XERCESJ-1582
         builder.exclude(TestLookupNamespaceURIWithEmptyDocument.class);
         
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_attrgetvalue2)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/createAttributeNS06)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocument08)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/createDocumentType04)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/getNamedItemNS03)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/getNamedItemNS04)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/namednodemapgetnameditemns01)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level2/core/setAttributeNS10)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetinputencoding03)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument07)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument10)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentnormalizedocument11)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/domconfigurationcansetparameter06)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo02)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/elementgetschematypeinfo07)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities02)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/entities03)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset01)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset02)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset03)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/infoset07)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri16)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegettextcontent18)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodeisequalnode03)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild13)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/noderemovechild24)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodereplacechild38)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/textiselementcontentwhitespace05)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfogettypename04)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom15)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom16)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom17)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom18)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom19)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom21)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom40)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom41)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom58)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom59)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom66)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom67)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom68)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/typeinfoisderivedfrom73)");
+        builder.exclude(W3CTestCase.class, "(id=http://www.w3.org/2001/DOM-Test-Suite/level3/core/wellformed03)");
+        
         return builder.build();
     }
 }