[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] SF.net SVN: htmlunit:[5029] trunk/htmlunit/src
From:       asashour () users ! sourceforge ! net
Date:       2009-09-30 10:45:58
Message-ID: E1Mswh4-0001ei-Ik () bj8yhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 5029
          http://htmlunit.svn.sourceforge.net/htmlunit/?rev=5029&view=rev
Author:   asashour
Date:     2009-09-30 10:45:58 +0000 (Wed, 30 Sep 2009)

Log Message:
-----------
JavaScript: fix xml attribute object type (FF only)

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java
  trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/AttrTest.java


Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java
 ===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java	2009-09-30 \
                10:42:06 UTC (rev 5028)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/xml/XMLDocument.java	2009-09-30 \
10:45:58 UTC (rev 5029) @@ -38,6 +38,7 @@
 import com.gargoylesoftware.htmlunit.html.HtmlElement;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
+import com.gargoylesoftware.htmlunit.javascript.host.Attr;
 import com.gargoylesoftware.htmlunit.javascript.host.Document;
 import com.gargoylesoftware.htmlunit.javascript.host.Element;
 import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection;
@@ -166,7 +167,13 @@
             scriptable = new Element();
         }
         else if (domNode instanceof DomAttr) {
-            final XMLAttr attribute = new XMLAttr();
+            final Attr attribute;
+            if (getPage().getWebClient().getBrowserVersion().isIE()) {
+                attribute = new XMLAttr();
+            }
+            else {
+                attribute = new Attr();
+            }
             attribute.init(domNode.getNodeName(), (DomElement) \
domNode.getParentNode());  scriptable = attribute;
         }

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/AttrTest.java
 ===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/AttrTest.java	2009-09-30 \
                10:42:06 UTC (rev 5028)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/AttrTest.java	2009-09-30 \
10:45:58 UTC (rev 5029) @@ -20,6 +20,7 @@
 import com.gargoylesoftware.htmlunit.BrowserRunner;
 import com.gargoylesoftware.htmlunit.WebDriverTestCase;
 import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
+import com.gargoylesoftware.htmlunit.BrowserRunner.Browser;
 import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented;
 
 /**
@@ -117,7 +118,7 @@
      * @throws Exception if the test fails
      */
     @Test
-    @NotYetImplemented
+    @NotYetImplemented(Browser.IE)
     @Alerts(IE = { "[object]", "undefined", "[object]", "" }, FF = {"[object Attr]", \
"", "[object Attr]", "" })  public void value() throws Exception {
         final String html = "<html><head><title>foo</title><script>\n"


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic