[HtmlUnit] SVN: [15454] trunk/htmlunit/src

rbri--- via HtmlUnit-develop <[email protected]>
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15454
          http://sourceforge.net/p/htmlunit/code/15454
Author:   rbri
Date:     2018-07-11 18:10:31 +0000 (Wed, 11 Jul 2018)
Log Message:
-----------
ie expectations update (wip)

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlButton2Test.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlForm2Test.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java	2018-07-11 17:57:29 UTC (rev 15453)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlButton.java	2018-07-11 18:10:31 UTC (rev 15454)
@@ -85,15 +85,13 @@
 
         HtmlForm form = null;
         final String formId = getAttributeDirect("form");
-        if (DomElement.ATTRIBUTE_NOT_DEFINED == formId) {
+        if (DomElement.ATTRIBUTE_NOT_DEFINED == formId || !hasFeature(FORM_FORM_ATTRIBUTE_SUPPORTED)) {
             form = getEnclosingForm();
         }
         else {
-            if (hasFeature(FORM_FORM_ATTRIBUTE_SUPPORTED)) {
-                final DomElement elem = getHtmlPageOrNull().getElementById(formId);
-                if (elem instanceof HtmlForm) {
-                    form = (HtmlForm) elem;
-                }
+            final DomElement elem = getHtmlPageOrNull().getElementById(formId);
+            if (elem instanceof HtmlForm) {
+                form = (HtmlForm) elem;
             }
         }
 

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlButton2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlButton2Test.java	2018-07-11 17:57:29 UTC (rev 15453)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlButton2Test.java	2018-07-11 18:10:31 UTC (rev 15454)
@@ -674,7 +674,7 @@
      */
     @Test
     @Alerts(DEFAULT = {"2", "second"},
-            IE = {"1", "first"})
+            IE = {"2", "third"})
     public void externalPreferenceFrom() throws Exception {
         final String html
             = "<html><head><title>first</title></head><body>\n"
@@ -712,7 +712,7 @@
      */
     @Test
     @Alerts(DEFAULT = {"2", "second"},
-            IE = {"1", "first"})
+            IE = {"2", "third"})
     public void internalDifferentFrom() throws Exception {
         final String html
             = "<html><head><title>first</title></head><body>\n"

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlForm2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlForm2Test.java	2018-07-11 17:57:29 UTC (rev 15453)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlForm2Test.java	2018-07-11 18:10:31 UTC (rev 15454)
@@ -41,7 +41,6 @@
 
 import com.gargoylesoftware.htmlunit.BrowserRunner;
 import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
-import com.gargoylesoftware.htmlunit.BrowserRunner.BuggyWebDriver;
 import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented;
 import com.gargoylesoftware.htmlunit.FormEncodingType;
 import com.gargoylesoftware.htmlunit.HttpHeader;
@@ -480,7 +479,6 @@
      */
     @Test
     @Alerts({"2", "third"})
-    @BuggyWebDriver(IE)
     public void buttonWithFormAction() throws Exception {
         final String html = "<!DOCTYPE html>\n"
             + "<html><head><title>first</title></head>\n"
@@ -539,9 +537,7 @@
      * @throws Exception if the test fails
      */
     @Test
-    @Alerts(DEFAULT = {"2", "third/"},
-            IE = {"1", "/"})
-    @NotYetImplemented(IE)
+    @Alerts({"2", "third/"})
     public void inputTypeSubmitWithFormAction() throws Exception {
         final String html = "<!DOCTYPE html>\n"
             + "<html><head></head>\n"
@@ -766,7 +762,6 @@
      * @throws Exception if the test fails
      */
     @Test
-    @BuggyWebDriver(IE)
     public void buttonWithFormTarget() throws Exception {
         final String html = "<!DOCTYPE html>\n"
             + "<html><head></head>\n"
@@ -810,7 +805,6 @@
     @Test
     @Alerts(DEFAULT = "second content",
             IE = "hello world")
-    @NotYetImplemented(IE)
     public void inputTypeSubmitWithFormTarget() throws Exception {
         final String html = "<!DOCTYPE html>\n"
             + "<html><head></head>\n"


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.