Skip to content

Commit

Permalink
Re-ignore tests, clarify reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
sevaseva committed Jul 17, 2015
1 parent 8e26905 commit dce3adb
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions java/client/test/org/openqa/selenium/WindowTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ public void testCanMaximizeTheWindow() throws InterruptedException {
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms
// though others aren't defined in org.openqa.selenium.Platform).
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
assumeNotLinuxAtSauce();

changeSizeTo(new Dimension(450, 275));
changeSizeTo(new Dimension(450, 273));
maximize();
}

Expand All @@ -155,9 +156,10 @@ public void testCanMaximizeTheWindowFromFrame() throws InterruptedException {
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms
// though others aren't defined in org.openqa.selenium.Platform).
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
assumeNotLinuxAtSauce();

driver.get(pages.framesetPage);
changeSizeTo(new Dimension(450, 275));
changeSizeTo(new Dimension(450, 274));

driver.switchTo().frame("fourth");
maximize();
Expand All @@ -170,6 +172,7 @@ public void testCanMaximizeTheWindowFromIframe() throws InterruptedException {
// Browser window cannot be resized or moved on ANDROID (and most mobile platforms
// though others aren't defined in org.openqa.selenium.Platform).
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
assumeNotLinuxAtSauce();

driver.get(pages.iframePage);
changeSizeTo(new Dimension(450, 275));
Expand Down Expand Up @@ -267,4 +270,14 @@ public Boolean apply(WebDriver driver) {
}
};
}

private void assumeNotLinuxAtSauce() {
// Tests that maximize browser window used to fail when Sauce didn't run a window manager
// on Linux. 2015-07-16, they still fail although Sauce reportedly runs metacity.
// Chrome/Linux: simply fail.
// Firefox/Linux: FirefoxDriver finally report a changed window size 22 seconds after replying
// the maximize command, but video never shows the maximized window.
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(LINUX) && SauceDriver.shouldUseSauce());
}

}

0 comments on commit dce3adb

Please sign in to comment.