Skip to content

Commit 4c7206c

Browse files
committed
isHeadful -> isHeaded
1 parent 098b21f commit 4c7206c

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

playwright/src/test/java/com/microsoft/playwright/TestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class TestBase {
5858
Page page;
5959
BrowserContext context;
6060

61-
static boolean isHeadful() {
61+
static boolean isHeaded() {
6262
return headed;
6363
}
6464

playwright/src/test/java/com/microsoft/playwright/TestBrowserContextCredentials.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public class TestBrowserContextCredentials extends TestBase {
2727

2828
static boolean isChromiumHeadedLike() {
2929
// --headless=new, the default in all Chromium channels, is like headless.
30-
return isChromium() && (isHeadful() || getBrowserChannelFromEnv() != null);
30+
return isChromium() && (isHeaded() || getBrowserChannelFromEnv() != null);
3131
}
3232

3333
@Test

playwright/src/test/java/com/microsoft/playwright/TestBrowserContextProxy.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ void shouldAuthenticate() {
129129
context.close();
130130
}
131131

132-
static boolean isChromiumHeadful() {
133-
return isChromium() && isHeadful();
132+
static boolean isChromiumHeaded() {
133+
return isChromium() && isHeaded();
134134
}
135135

136136
@Test
137-
@DisabledIf(value="isChromiumHeadful", disabledReason="fixme")
137+
@DisabledIf(value="isChromiumHeaded", disabledReason="fixme")
138138
void shouldExcludePatterns() {
139139
server.setRoute("/target.html", exchange -> {
140140
exchange.sendResponseHeaders(200, 0);

playwright/src/test/java/com/microsoft/playwright/TestDownload.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,12 +341,12 @@ void shouldReportAltClickDownloads() throws IOException {
341341
}
342342

343343

344-
static boolean isChromiumHeadful() {
345-
return isChromium() && isHeadful();
344+
static boolean isChromiumHeaded() {
345+
return isChromium() && isHeaded();
346346
}
347347

348348
@Test
349-
@DisabledIf(value="isChromiumHeadful", disabledReason="fixme")
349+
@DisabledIf(value="isChromiumHeaded", disabledReason="fixme")
350350
void shouldReportNewWindowDownloads() throws IOException {
351351
// TODO: - the test fails in headed Chromium as the popup page gets closed along
352352
// with the session before download completed event arrives.

playwright/src/test/java/com/microsoft/playwright/TestElementHandleBoundingBox.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626

2727
public class TestElementHandleBoundingBox extends TestBase {
2828

29-
static boolean isFirefoxHeadful() {
30-
return isFirefox() && isHeadful();
29+
static boolean isFirefoxHeaded() {
30+
return isFirefox() && isHeaded();
3131
}
3232

3333
@Test
34-
@DisabledIf(value="isFirefoxHeadful", disabledReason="fail")
34+
@DisabledIf(value="isFirefoxHeaded", disabledReason="fail")
3535
void shouldWork() {
3636
page.setViewportSize(500, 500);
3737
page.navigate(server.PREFIX + "/grid.html");

playwright/src/test/java/com/microsoft/playwright/TestOptionsFactories.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public static String getBrowserChannelFromEnv() {
3535
public static BrowserType.LaunchOptions createLaunchOptions() {
3636
BrowserType.LaunchOptions options;
3737
options = new BrowserType.LaunchOptions();
38-
options.headless = !getHeadful();
38+
options.headless = !getHeaded();
3939
return options;
4040
}
4141

42-
private static boolean getHeadful() {
42+
private static boolean getHeaded() {
4343
String headedEnv = System.getenv("HEADED");
4444
return headedEnv != null && !"0".equals(headedEnv) && !"false".equals(headedEnv);
4545
}

playwright/src/test/java/com/microsoft/playwright/TestPageSetInputFiles.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ void shouldUploadAFolder(@TempDir Path tmpDir) throws IOException {
451451
List<String> relativePathsSorted = new ArrayList<>(webkitRelativePaths);
452452
relativePathsSorted.sort(String::compareTo);
453453
// https://issues.chromium.org/issues/345393164
454-
if (isChromium() && !isHeadful() && chromiumVersionLessThan(browser.version(), "127.0.6533.0")) {
454+
if (isChromium() && !isHeaded() && chromiumVersionLessThan(browser.version(), "127.0.6533.0")) {
455455
assertEquals(asList("file-upload-test/file1.txt", "file-upload-test/file2"), relativePathsSorted);
456456
} else {
457457
assertEquals(asList("file-upload-test/file1.txt", "file-upload-test/file2", "file-upload-test/sub-dir/really.txt"), relativePathsSorted);

playwright/src/test/java/com/microsoft/playwright/TestRequestFulfill.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ void shouldWorkWithStatusCode422() {
5555
assertEquals("Yo, page!", page.evaluate("document.body.textContent"));
5656
}
5757

58-
static boolean isFirefoxHeadful() {
59-
return isFirefox() && isHeadful();
58+
static boolean isFirefoxHeaded() {
59+
return isFirefox() && isHeaded();
6060
}
6161

6262
@Test
63-
@DisabledIf(value="isFirefoxHeadful", disabledReason="skip")
63+
@DisabledIf(value="isFirefoxHeaded", disabledReason="skip")
6464
void shouldAllowMockingBinaryResponses() {
6565
page.route("**/*", route -> {
6666
byte[] imageBuffer;
@@ -85,7 +85,7 @@ void shouldAllowMockingBinaryResponses() {
8585
}
8686

8787
@Test
88-
@DisabledIf(value="isFirefoxHeadful", disabledReason="skip")
88+
@DisabledIf(value="isFirefoxHeaded", disabledReason="skip")
8989
void shouldAllowMockingSvgWithCharset() {
9090
// Firefox headed produces a different image.
9191
page.route("**/*", route -> {

0 commit comments

Comments
 (0)