[prev in list] [next in list] [prev in thread] [next in thread]
List: htmlunit-develop
Subject: [HtmlUnit] SVN: [13928] branches/huThread/htmlunit/src/test/java/com/gargoylesoftware
From: asashour () users ! sourceforge ! net
Date: 2017-03-27 7:30:33
Message-ID: 1490599833.856746.7615 () sfp-scm-3 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 13928
http://sourceforge.net/p/htmlunit/code/13928
Author: asashour
Date: 2017-03-27 07:30:33 +0000 (Mon, 27 Mar 2017)
Log Message:
-----------
@Ignore case for now
Modified Paths:
--------------
branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement3Test.java
Modified: branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement3Test.java
===================================================================
--- branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement3Test.java 2017-03-27 \
07:23:06 UTC (rev 13927)
+++ branches/huThread/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLIFrameElement3Test.java 2017-03-27 \
07:30:33 UTC (rev 13928) @@ -21,6 +21,7 @@
import java.net.URL;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.openqa.selenium.By;
@@ -221,9 +222,7 @@
* @throws Exception if an error occurs
*/
@Test
- @Alerts(DEFAULT = {"123", "undefined"},
- IE = {"123"})
- @NotYetImplemented(IE)
+ @Alerts({"123", "undefined"})
public void iFrameReinitialized() throws Exception {
final String html
= HtmlPageTest.STANDARDS_MODE_PREFIX_
@@ -236,6 +235,7 @@
final String frame1 = "<html><head><script>window.foo = 123; \
alert(window.foo);</script></head></html>";
final String frame2 = \
"<html><head><script>alert(window.foo);</script></head></html>";
+ final String[] alerts = getExpectedAlerts();
final MockWebConnection webConnection = getMockWebConnection();
webConnection.setResponse(URL_FIRST, html);
@@ -243,11 +243,12 @@
webConnection.setResponse(new URL(URL_FIRST, "2.html"), frame2);
final WebDriver driver = loadPage2(html);
+ verifyAlerts(driver, alerts[0]);
driver.findElement(By.id("test")).click();
+ verifyAlerts(driver, alerts[1]);
assertEquals(3, getMockWebConnection().getRequestCount());
- verifyAlerts(driver, getExpectedAlerts());
}
/**
@@ -650,6 +651,8 @@
*/
@Test
@Alerts({"[object Window]", "topbody", "framebody", "[object Window]", "frame", \
"frameinput"}) + @Ignore
+ // check expectations
public void contentWindowAndActiveElement() throws Exception {
final String firstContent
= HtmlPageTest.STANDARDS_MODE_PREFIX_
@@ -674,6 +677,8 @@
+ " <input id='frameinput'>\n"
+ "</body></html>";
+ final String[] alerts = getExpectedAlerts();
+ int i = 0;
final MockWebConnection webConnection = getMockWebConnection();
webConnection.setResponse(URL_FIRST, firstContent);
@@ -683,6 +688,7 @@
final JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
jsExecutor.executeScript("check();");
+ verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++]);
driver.switchTo().frame("frame");
driver.findElement(By.id("frameinput")).click();
@@ -689,7 +695,6 @@
driver.switchTo().defaultContent();
jsExecutor.executeScript("check();");
-
- verifyAlerts(driver, getExpectedAlerts());
+ verifyAlerts(driver, alerts[i++], alerts[i++], alerts[i++]);
}
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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