[HtmlUnit] SVN: [15410] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/ javascript/host/canvas/IntersectionObserverTest.java
rbri--- via HtmlUnit-develop <[email protected]>
| Newsgroups | gmane.comp.java.htmlunit.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 15410
http://sourceforge.net/p/htmlunit/code/15410
Author: rbri
Date: 2018-06-29 11:57:58 +0000 (Fri, 29 Jun 2018)
Log Message:
-----------
ff60 support (wip)
Modified Paths:
--------------
trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverTest.java
Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverTest.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverTest.java 2018-06-29 11:37:26 UTC (rev 15409)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/canvas/IntersectionObserverTest.java 2018-06-29 11:57:58 UTC (rev 15410)
@@ -25,16 +25,42 @@
* Unit tests for {@link IntersectionObserver}.
*
* @author Ahmed Ashour
+ * @author Ronald Brill
*/
@RunWith(BrowserRunner.class)
public class IntersectionObserverTest extends WebDriverTestCase {
/**
+ * @throws Exception if the test fails
+ */
+ @Test
+ @Alerts(DEFAULT = "true",
+ FF52 = "false",
+ IE = "false")
+ public void inWindow() throws Exception {
+ final String html
+ = "<html>\n"
+ + "<head>\n"
+ + " <script>\n"
+ + " function test() {\n"
+ + " alert('IntersectionObserver' in window);\n"
+ + " }\n"
+ + " </script>\n"
+ + "</head>\n"
+ + "<body onload='test()'>\n"
+ + "</body>\n"
+ + "</html>";
+
+ loadPageWithAlerts2(html);
+ }
+
+ /**
* @throws Exception if an error occurs
*/
@Test
- @Alerts(DEFAULT = {},
- CHROME = {"function", "function", "function", "function"})
+ @Alerts(DEFAULT = "no IntersectionObserver",
+ CHROME = {"function", "function", "function", "function"},
+ FF60 = {"function", "function", "function", "function"})
public void functions() throws Exception {
final String html =
"<html><head><script>\n"
@@ -46,7 +72,7 @@
+ " alert(typeof observer.unobserve);\n"
+ " alert(typeof observer.disconnect);\n"
+ " alert(typeof observer.takeRecords);\n"
- + " }\n"
+ + " } else { alert('no IntersectionObserver'); }\n"
+ "}\n"
+ "</script>\n"
+ "</head>\n"
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot