[java] Deleting a sleep in tests that was introduced to overcome a bug in Chrome on Android, but the target bug report is closed now.
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.junit.Assume.assumeFalse;
-import static org.openqa.selenium.Platform.ANDROID;
import static org.openqa.selenium.WaitingConditions.newWindowIsOpened;
import static org.openqa.selenium.WaitingConditions.windowHandleCountToBe;
import static org.openqa.selenium.WaitingConditions.windowHandleCountToBeGreaterThan;
import org.openqa.selenium.testing.NoDriverAfterTest;
import org.openqa.selenium.testing.NotYetImplemented;
import org.openqa.selenium.testing.SwitchToTopAfterTest;
-import org.openqa.selenium.testing.TestUtilities;
import org.openqa.selenium.testing.drivers.Browser;
import java.util.Set;
@@ -192,8 +190,7 @@ public void testShouldBeAbleToIterateOverAllOpenWindows() {
}
@Test
- public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang()
- throws Exception {
+ public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToHang() {
assumeFalse(Browser.detect() == Browser.OPERA &&
getEffectivePlatform(driver).is(Platform.WINDOWS));
@@ -206,11 +203,6 @@ public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToH
driver.switchTo().window("result");
- // TODO Remove sleep when https://bugs.chromium.org/p/chromedriver/issues/detail?id=1044 is fixed.
- if (TestUtilities.isChrome(driver) && getEffectivePlatform(driver).is(ANDROID)) {
- Thread.sleep(1000);
- }
-
wait.until(ExpectedConditions.presenceOfElementLocated(By.id("close"))).click();
if (isInternetExplorer(driver) && !isIe6(driver)) {
@@ -224,7 +216,7 @@ public void testClickingOnAButtonThatClosesAnOpenWindowDoesNotCauseTheBrowserToH
@Test
@Ignore(SAFARI)
@Ignore(EDGE)
- public void testCanCallGetWindowHandlesAfterClosingAWindow() throws Exception {
+ public void testCanCallGetWindowHandlesAfterClosingAWindow() {
assumeFalse(Browser.detect() == Browser.OPERA &&
getEffectivePlatform(driver).is(Platform.WINDOWS));
boolean isNewIE = isInternetExplorer(driver) && !isIe6(driver);
@@ -241,11 +233,6 @@ public void testCanCallGetWindowHandlesAfterClosingAWindow() throws Exception {
int allWindowHandles = driver.getWindowHandles().size();
assertThat(allWindowHandles).isEqualTo(currentWindowHandles.size() + 1);
- // TODO Remove sleep when https://bugs.chromium.org/p/chromedriver/issues/detail?id=1044 is fixed.
- if (TestUtilities.isChrome(driver) && getEffectivePlatform(driver).is(ANDROID)) {
- Thread.sleep(1000);
- }
-
wait.until(ExpectedConditions.presenceOfElementLocated(By.id("close"))).click();
if (isNewIE) {
