vhardy      2003/06/30 05:36:45

  Modified:    test-resources/org/apache/batik/dom unitTesting.xml
               sources/org/apache/batik/dom AbstractElement.java
  Added:       test-resources/org/apache/batik/dom bug18143.svg
               test-sources/org/apache/batik/dom EcmaScriptDOMTest.java
  Log:
  Automatically create new directories needed for new extension Opera tests so that 
regard does not fail. Fixed Bug #18143 and added test to test suite
  
  Revision  Changes    Path
  1.11      +9 -1      xml-batik/test-resources/org/apache/batik/dom/unitTesting.xml
  
  Index: unitTesting.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/dom/unitTesting.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- unitTesting.xml   10 Mar 2003 12:47:27 -0000      1.10
  +++ unitTesting.xml   30 Jun 2003 12:36:44 -0000      1.11
  @@ -14,6 +14,14 @@
   <testSuite id="dom.unitTesting" name="org.apache.batik.dom package - Unit Testing">
   
       <!-- ========================================================================== 
-->
  +    <!-- ECMAScript based DOM test                                                  
-->
  +    <!-- ========================================================================== 
-->
  +    <testGroup id="ecmaDOM" name="Basic DOM Tests from ECMA Scripts"
  +               class="org.apache.batik.dom.EcmaScriptDOMTest">
  +        <test id="bug18143" />
  +    </testGroup>
  +
  +    <!-- ========================================================================== 
-->
       <!-- setAttribute test                                                          
-->
       <!-- ========================================================================== 
-->
       <test id="setAttribute" class="org.apache.batik.dom.SetAttributeTest" >
  
  
  
  1.1                  xml-batik/test-resources/org/apache/batik/dom/bug18143.svg
  
  Index: bug18143.svg
  ===================================================================
  <?xml version="1.0" standalone="no"?>
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
  "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
  
  
  <!-- ========================================================================= -->
  <!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
  <!--                                                                           -->
  <!-- This software is published under the terms of the Apache Software License -->
  <!-- version 1.1, a copy of which has been included with this distribution in  -->
  <!-- the LICENSE file.                                                         -->
  <!-- ========================================================================= -->
  
  <!-- ========================================================================= -->
  <!--                                                                           -->
  <!-- @author [EMAIL PROTECTED]                                             -->
  <!-- @version $Id: bug18143.svg,v 1.1 2003/06/30 12:36:44 vhardy Exp $          -->
  <!-- ========================================================================= -->
  
  <svg xmlns="http://www.w3.org/2000/svg"; 
       xmlns:xlink="http://www.w3.org/1999/xlink"; 
       xmlns:test="http://xml.apache.org/batik/test";
       width="350" height="350" onload="runTest(evt)" >
  
      <test:testResult id="testResult" />
  
      <script type="text/ecmascript">
     var testNS = "http://xml.apache.org/batik/test";;
  
     function runTest() {
         var result = document.getElementById("testResult");
         var t = document.getElementById("text");
         t.setAttributeNS("http://foo.com";, "foo:bar", "barValue"); 
         var an = t.getAttributeNodeNS("http://foo.com";, "bar");
         t.removeAttributeNode(an);
         t.setAttributeNS(null, "fill", "#0F0");
         result.setAttributeNS(null, "result", "passed");
     }
  
  </script>
  
      <text id="text" x="50%" y="50%" text-anchor="middle" fill="red">This string is 
red if test failed, green otherwise</text>
  
  </svg>
  
  
  
  1.1                  
xml-batik/test-sources/org/apache/batik/dom/EcmaScriptDOMTest.java
  
  Index: EcmaScriptDOMTest.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.dom;
  
  import org.apache.batik.test.svg.SelfContainedSVGOnLoadTest;
  
  /**
   * Helper class to simplify writing the unitTesting.xml file for 
   * DOM Tests.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
   * @version $Id: EcmaScriptDOMTest.java,v 1.1 2003/06/30 12:36:45 vhardy Exp $
   */
  
  public class EcmaScriptDOMTest extends SelfContainedSVGOnLoadTest {
      public void setId(String id){
          super.setId(id);
          svgURL = resolveURL("test-resources/org/apache/batik/dom/" + id + ".svg");
      }
  }
  
  
  
  1.21      +3 -2      xml-batik/sources/org/apache/batik/dom/AbstractElement.java
  
  Index: AbstractElement.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/dom/AbstractElement.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AbstractElement.java      11 Apr 2003 13:56:01 -0000      1.20
  +++ AbstractElement.java      30 Jun 2003 12:36:45 -0000      1.21
  @@ -173,7 +173,8 @@
                                     "attribute.missing",
                                     new Object[] { oldAttr.getName() });
        }
  -     return (Attr)attributes.removeNamedItem(oldAttr.getNodeName());
  +     return (Attr)attributes.removeNamedItemNS(oldAttr.getNamespaceURI(),
  +                                                  oldAttr.getLocalName());
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to