diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBase.java b/playwright/src/test/java/com/microsoft/playwright/TestBase.java index 4024e4599..9d3981f74 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestBase.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestBase.java @@ -45,12 +45,12 @@ public class TestBase { static final boolean isMac = Utils.getOS() == Utils.OS.MAC; static final boolean isLinux = Utils.getOS() == Utils.OS.LINUX; static final boolean isWindows = Utils.getOS() == Utils.OS.WINDOWS; - static final boolean headful; + static final boolean headed; static final SameSiteAttribute defaultSameSiteCookieValue; static { - String headfulEnv = System.getenv("HEADFUL"); - headful = headfulEnv != null && !"0".equals(headfulEnv) && !"false".equals(headfulEnv); + String headedEnv = System.getenv("HEADED"); + headed = headedEnv != null && !"0".equals(headedEnv) && !"false".equals(headedEnv); defaultSameSiteCookieValue = initSameSiteAttribute(); } @@ -58,8 +58,8 @@ public class TestBase { Page page; BrowserContext context; - static boolean isHeadful() { - return headful; + static boolean isHeaded() { + return headed; } static boolean isChromium() { @@ -81,7 +81,7 @@ static String getBrowserChannelFromEnv() { static BrowserType.LaunchOptions createLaunchOptions() { BrowserType.LaunchOptions options; options = new BrowserType.LaunchOptions(); - options.headless = !headful; + options.headless = !headed; options.channel = getBrowserChannelFromEnv(); return options; } diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextCredentials.java b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextCredentials.java index addf6e549..c5ba18b3a 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextCredentials.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextCredentials.java @@ -27,7 +27,7 @@ public class TestBrowserContextCredentials extends TestBase { static boolean isChromiumHeadedLike() { // --headless=new, the default in all Chromium channels, is like headless. - return isChromium() && (isHeadful() || getBrowserChannelFromEnv() != null); + return isChromium() && (isHeaded() || getBrowserChannelFromEnv() != null); } @Test diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextProxy.java b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextProxy.java index 877661b99..7f2f2657f 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextProxy.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextProxy.java @@ -129,12 +129,12 @@ void shouldAuthenticate() { context.close(); } - static boolean isChromiumHeadful() { - return isChromium() && isHeadful(); + static boolean isChromiumHeaded() { + return isChromium() && isHeaded(); } @Test - @DisabledIf(value="isChromiumHeadful", disabledReason="fixme") + @DisabledIf(value="isChromiumHeaded", disabledReason="fixme") void shouldExcludePatterns() { server.setRoute("/target.html", exchange -> { exchange.sendResponseHeaders(200, 0); diff --git a/playwright/src/test/java/com/microsoft/playwright/TestDefaultBrowserContext2.java b/playwright/src/test/java/com/microsoft/playwright/TestDefaultBrowserContext2.java index 85acbe08a..6c03accb1 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestDefaultBrowserContext2.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestDefaultBrowserContext2.java @@ -128,7 +128,7 @@ void shouldSupportIgnoreHTTPSErrorsOption() { @Test void shouldSupportExtraHTTPHeadersOption() throws ExecutionException, InterruptedException { -// TODO: test.flaky(browserName === "firefox" && headful && platform === "linux", "Intermittent timeout on bots"); +// TODO: test.flaky(browserName === "firefox" && headed && platform === "linux", "Intermittent timeout on bots"); Page page = launchPersistent(new BrowserType.LaunchPersistentContextOptions().setExtraHTTPHeaders(mapOf("foo", "bar"))); Future request = server.futureRequest("/empty.html"); page.navigate(server.EMPTY_PAGE); diff --git a/playwright/src/test/java/com/microsoft/playwright/TestDownload.java b/playwright/src/test/java/com/microsoft/playwright/TestDownload.java index 9b08a1ce3..d391407cb 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestDownload.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestDownload.java @@ -341,14 +341,14 @@ void shouldReportAltClickDownloads() throws IOException { } - static boolean isChromiumHeadful() { - return isChromium() && isHeadful(); + static boolean isChromiumHeaded() { + return isChromium() && isHeaded(); } @Test - @DisabledIf(value="isChromiumHeadful", disabledReason="fixme") + @DisabledIf(value="isChromiumHeaded", disabledReason="fixme") void shouldReportNewWindowDownloads() throws IOException { - // TODO: - the test fails in headful Chromium as the popup page gets closed along + // TODO: - the test fails in headed Chromium as the popup page gets closed along // with the session before download completed event arrives. // - WebKit doesn't close the popup page Page page = browser.newPage(new Browser.NewPageOptions().setAcceptDownloads(true)); diff --git a/playwright/src/test/java/com/microsoft/playwright/TestElementHandleBoundingBox.java b/playwright/src/test/java/com/microsoft/playwright/TestElementHandleBoundingBox.java index 9965e4ba1..c08c78ec1 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestElementHandleBoundingBox.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestElementHandleBoundingBox.java @@ -26,12 +26,12 @@ public class TestElementHandleBoundingBox extends TestBase { - static boolean isFirefoxHeadful() { - return isFirefox() && isHeadful(); + static boolean isFirefoxHeaded() { + return isFirefox() && isHeaded(); } @Test - @DisabledIf(value="isFirefoxHeadful", disabledReason="fail") + @DisabledIf(value="isFirefoxHeaded", disabledReason="fail") void shouldWork() { page.setViewportSize(500, 500); page.navigate(server.PREFIX + "/grid.html"); diff --git a/playwright/src/test/java/com/microsoft/playwright/TestOptionsFactories.java b/playwright/src/test/java/com/microsoft/playwright/TestOptionsFactories.java index ee19f209f..ce28fa3fa 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestOptionsFactories.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestOptionsFactories.java @@ -35,13 +35,13 @@ public static String getBrowserChannelFromEnv() { public static BrowserType.LaunchOptions createLaunchOptions() { BrowserType.LaunchOptions options; options = new BrowserType.LaunchOptions(); - options.headless = !getHeadful(); + options.headless = !getHeaded(); return options; } - private static boolean getHeadful() { - String headfulEnv = System.getenv("HEADFUL"); - return headfulEnv != null && !"0".equals(headfulEnv) && !"false".equals(headfulEnv); + private static boolean getHeaded() { + String headedEnv = System.getenv("HEADED"); + return headedEnv != null && !"0".equals(headedEnv) && !"false".equals(headedEnv); } public static String getBrowserName() { diff --git a/playwright/src/test/java/com/microsoft/playwright/TestPageScreenshot.java b/playwright/src/test/java/com/microsoft/playwright/TestPageScreenshot.java index 2e82c9208..d3485fc6f 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestPageScreenshot.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestPageScreenshot.java @@ -40,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertArrayEquals; -// TODO: suite.skip(browserName === "firefox" && headful"); +// TODO: suite.skip(browserName === "firefox" && headed"); public class TestPageScreenshot extends TestBase { @Test void shouldWork() throws IOException { diff --git a/playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java b/playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java index 63fe51178..1266d2f12 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java @@ -451,7 +451,7 @@ void shouldUploadAFolder(@TempDir Path tmpDir) throws IOException { List relativePathsSorted = new ArrayList<>(webkitRelativePaths); relativePathsSorted.sort(String::compareTo); // https://issues.chromium.org/issues/345393164 - if (isChromium() && !isHeadful() && chromiumVersionLessThan(browser.version(), "127.0.6533.0")) { + if (isChromium() && !isHeaded() && chromiumVersionLessThan(browser.version(), "127.0.6533.0")) { assertEquals(asList("file-upload-test/file1.txt", "file-upload-test/file2"), relativePathsSorted); } else { assertEquals(asList("file-upload-test/file1.txt", "file-upload-test/file2", "file-upload-test/sub-dir/really.txt"), relativePathsSorted); diff --git a/playwright/src/test/java/com/microsoft/playwright/TestRequestFulfill.java b/playwright/src/test/java/com/microsoft/playwright/TestRequestFulfill.java index aba21f045..048cd412c 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestRequestFulfill.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestRequestFulfill.java @@ -55,12 +55,12 @@ void shouldWorkWithStatusCode422() { assertEquals("Yo, page!", page.evaluate("document.body.textContent")); } - static boolean isFirefoxHeadful() { - return isFirefox() && isHeadful(); + static boolean isFirefoxHeaded() { + return isFirefox() && isHeaded(); } @Test - @DisabledIf(value="isFirefoxHeadful", disabledReason="skip") + @DisabledIf(value="isFirefoxHeaded", disabledReason="skip") void shouldAllowMockingBinaryResponses() { page.route("**/*", route -> { byte[] imageBuffer; @@ -85,9 +85,9 @@ void shouldAllowMockingBinaryResponses() { } @Test - @DisabledIf(value="isFirefoxHeadful", disabledReason="skip") + @DisabledIf(value="isFirefoxHeaded", disabledReason="skip") void shouldAllowMockingSvgWithCharset() { - // Firefox headful produces a different image. + // Firefox headed produces a different image. page.route("**/*", route -> { route.fulfill(new Route.FulfillOptions() .setContentType("image/svg+xml ; charset=utf-8")