Enable screenshot comparison in external build

This change actually enabled the screenshot comparison in the
visual regression tests. We used Docker to provision Chrome
and ChromeDriver to eliminate the discrepancy of environment
between local development and Travis CI.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=237811918
This commit is contained in:
shicong 2019-03-11 08:59:05 -07:00 committed by Ben McIlwain
parent 44e3668510
commit a7d099d2a3
87 changed files with 338 additions and 69 deletions

View file

@ -66,7 +66,7 @@ public final class WebDriverRule extends ExternalResource
private static final Dimension DEFAULT_WINDOW_SIZE = new Dimension(1200, 2000);
private static final String GOLDENS_PATH =
getResource(WebDriverRule.class, "scuba_goldens/chrome-linux").getFile();
getResource(WebDriverRule.class, "goldens/chrome-linux").getFile();
private WebDriver driver;
private WebDriverPlusScreenDiffer webDriverPlusScreenDiffer;
@ -99,10 +99,10 @@ public final class WebDriverRule extends ExternalResource
@Override
protected void after() {
webDriverPlusScreenDiffer.verifyAndQuit();
try {
driver.quit();
webDriverPlusScreenDiffer.verifyAndQuit();
} finally {
driver.quit();
driver = null;
}
}