[HtmlUnit] SVN: [15452] trunk/htmlunit/src/test

rbri--- via HtmlUnit-develop <[email protected]>
Newsgroups gmane.comp.java.htmlunit.devel
Message-ID <[email protected]>
Revision: 15452
          http://sourceforge.net/p/htmlunit/code/15452
Author:   rbri
Date:     2018-07-11 17:24:35 +0000 (Wed, 11 Jul 2018)
Log Message:
-----------
ff60 support (wip)

Modified Paths:
--------------
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Dojo102Test.java

Added Paths:
-----------
    trunk/htmlunit/src/test/resources/libraries/dojo/1.0.2/expectations/testsbehavior.FF60.txt

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java	2018-07-10 17:11:42 UTC (rev 15451)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/dom/MutationObserverTest.java	2018-07-11 17:24:35 UTC (rev 15452)
@@ -14,6 +14,8 @@
  */
 package com.gargoylesoftware.htmlunit.javascript.host.dom;
 
+import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF60;
+
 import java.net.URL;
 import java.util.Arrays;
 
@@ -24,6 +26,7 @@
 
 import com.gargoylesoftware.htmlunit.BrowserRunner;
 import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts;
+import com.gargoylesoftware.htmlunit.BrowserRunner.BuggyWebDriver;
 import com.gargoylesoftware.htmlunit.WebDriverTestCase;
 
 /**
@@ -322,6 +325,7 @@
      */
     @Test
     @Alerts("[object HTMLHeadingElement]-attributes")
+    @BuggyWebDriver(FF60)
     public void attributeValue2() throws Exception {
         final String html = "<html><head><script>\n"
             + "  function makeRed() {\n"
@@ -329,9 +333,13 @@
             + "  }\n"
 
             + "  function print(mutation) {\n"
-            + "    alert(mutation.target + '-' + mutation.type);\n"
+            + "    log(mutation.target + '-' + mutation.type);\n"
             + "  }\n"
 
+            + "  function log(x) {\n"
+            + "    document.getElementById('log').value += x + '\\n';\n"
+            + "  }\n"
+
             + "  function test() {\n"
             + "    var mobs = new MutationObserver(function(mutations) {\n"
             + "      mutations.forEach(print)\n"
@@ -353,10 +361,13 @@
             + "    <h1 id='headline' style='font-style: italic'>Some headline</h1>\n"
             + "    <input id='id1' type='button' onclick='makeRed()' value='Make Red'>\n"
             + "  </div>\n"
+            + "  <textarea id='log' cols='80' rows='40'></textarea>\n"
             + "</body></html>\n";
         final WebDriver driver = loadPage2(html);
         driver.findElement(By.id("id1")).click();
-        verifyAlerts(driver, getExpectedAlerts());
+
+        final String text = driver.findElement(By.id("log")).getAttribute("value").trim().replaceAll("\r", "");
+        assertEquals(String.join("\n", getExpectedAlerts()), text);
     }
 
     /**

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Dojo102Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Dojo102Test.java	2018-07-10 17:11:42 UTC (rev 15451)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/libraries/Dojo102Test.java	2018-07-11 17:24:35 UTC (rev 15452)
@@ -14,7 +14,7 @@
  */
 package com.gargoylesoftware.htmlunit.libraries;
 
-import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF;
+import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.FF52;
 import static com.gargoylesoftware.htmlunit.BrowserRunner.TestedBrowser.IE;
 
 import org.junit.Test;
@@ -269,7 +269,7 @@
      * @throws Exception if an error occurs
      */
     @Test
-    @NotYetImplemented({FF, IE})
+    @NotYetImplemented({FF52, IE})
     public void testsbehavior() throws Exception {
         test("tests.behavior");
     }

Added: trunk/htmlunit/src/test/resources/libraries/dojo/1.0.2/expectations/testsbehavior.FF60.txt
===================================================================
--- trunk/htmlunit/src/test/resources/libraries/dojo/1.0.2/expectations/testsbehavior.FF60.txt	                        (rev 0)
+++ trunk/htmlunit/src/test/resources/libraries/dojo/1.0.2/expectations/testsbehavior.FF60.txt	2018-07-11 17:24:35 UTC (rev 15452)
@@ -0,0 +1,18 @@
+ 1 tests to run in 1 groups
+ ------------------------------------------------------------
+ GROUP "tests.behavior" has 1 test to run
+ 4 tests to run in 1 groups
+ ------------------------------------------------------------
+ GROUP "t" has 4 tests to run
+ PASSED test: ../../dojo/tests/behavior.html::t::add
+ PASSED test: ../../dojo/tests/behavior.html::t::apply
+ PASSED test: ../../dojo/tests/behavior.html::t::reapply
+ PASSED test: ../../dojo/tests/behavior.html::t::topics
+ PASSED test: ../../dojo/tests/behavior.html
+ WOOHOO!!
+ ------------------------------------------------------------
+ | TEST SUMMARY:
+ ------------------------------------------------------------
+      5 tests in 2 groups
+      0 errors
+      0 failures


Property changes on: trunk/htmlunit/src/test/resources/libraries/dojo/1.0.2/expectations/testsbehavior.FF60.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property

------------------------------------------------------------------------------
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.