Skip to content

Commit 3f60144

Browse files
authored
chore: update driver to 1.23.0 (#968)
1 parent 8004e5d commit 3f60144

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom
1111

1212
| | Linux | macOS | Windows |
1313
| :--- | :---: | :---: | :---: |
14-
| Chromium <!-- GEN:chromium-version -->103.0.5060.53<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
14+
| Chromium <!-- GEN:chromium-version -->104.0.5112.20<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1515
| WebKit <!-- GEN:webkit-version -->15.4<!-- GEN:stop --> ||||
1616
| Firefox <!-- GEN:firefox-version -->100.0.2<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1717

playwright/src/main/java/com/microsoft/playwright/Request.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ public interface Request {
5858
*/
5959
Frame frame();
6060
/**
61-
* **DEPRECATED** Incomplete list of headers as seen by the rendering engine. Use {@link Request#allHeaders
62-
* Request.allHeaders()} instead.
61+
* An object with the request HTTP headers. The header names are lower-cased. Note that this method does not return
62+
* security-related headers, including cookie-related ones. You can use {@link Request#allHeaders Request.allHeaders()} for
63+
* complete list of headers that include {@code cookie} information.
6364
*/
6465
Map<String, String> headers();
6566
/**

playwright/src/main/java/com/microsoft/playwright/Response.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ public interface Response {
4545
*/
4646
boolean fromServiceWorker();
4747
/**
48-
* **DEPRECATED** Incomplete list of headers as seen by the rendering engine. Use {@link Response#allHeaders
49-
* Response.allHeaders()} instead.
48+
* An object with the response HTTP headers. The header names are lower-cased. Note that this method does not return
49+
* security-related headers, including cookie-related ones. You can use {@link Response#allHeaders Response.allHeaders()}
50+
* for complete list of headers that include {@code cookie} information.
5051
*/
5152
Map<String, String> headers();
5253
/**

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,19 @@ void shouldGetANonSessionCookie() {
6565
" return document.cookie;\n" +
6666
" }");
6767
assertEquals("username=John Doe", documentCookie);
68-
int timestamp = (Integer) page.evaluate("+(new Date('1/1/2038'))/1000");
6968
Cookie cookie = context.cookies().get(0);
7069
assertEquals("username", cookie.name);
7170
assertEquals("John Doe", cookie.value);
7271
assertEquals("localhost", cookie.domain);
7372
assertEquals("/", cookie.path);
74-
assertEquals(timestamp, cookie.expires);
73+
// Browsers start to cap cookies with 400 days max expires value.
74+
// See https://github.com/httpwg/http-extensions/pull/1732
75+
// Chromium patch: https://chromium.googlesource.com/chromium/src/+/aaa5d2b55478eac2ee642653dcd77a50ac3faff6
76+
// We want to make sure that expires date is at least 400 days in future.
77+
Double timestamp = (Double) page.evaluate("const FOUR_HUNDRED_DAYS = 1000 * 60 * 60 * 24 * 400;\n" +
78+
" const FIVE_MINUTES = 1000 * 60 * 5; // relax condition a bit to make sure test is not flaky.\n" +
79+
" (Date.now() + FOUR_HUNDRED_DAYS - FIVE_MINUTES) / 1000;");
80+
assertTrue(cookie.expires > timestamp, cookie.expires + " > " + timestamp + " failed.");
7581
assertEquals(false, cookie.httpOnly);
7682
assertEquals(false, cookie.secure);
7783
if (isChromium()) {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.microsoft.playwright.options.HarMode;
2020
import com.microsoft.playwright.options.HarNotFound;
2121
import org.junit.jupiter.api.Test;
22+
import org.junit.jupiter.api.condition.DisabledIf;
2223
import org.junit.jupiter.api.io.TempDir;
2324

2425
import java.io.IOException;
@@ -213,6 +214,7 @@ void shouldGoBackToRedirectedNavigation() {
213214
}
214215

215216
@Test
217+
@DisabledIf(value="isFirefox", disabledReason="Flaky in Firefox, upstream as well")
216218
void shouldGoForwardToRedirectedNavigation() {
217219
Path path = Paths.get("src/test/resources/har-redirect.har");
218220
context.routeFromHAR(path, new BrowserContext.RouteFromHAROptions().setUrl(Pattern.compile(".*theverge.*")));

scripts/CLI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.23.0-beta-1656035897000
1+
1.23.0

0 commit comments

Comments
 (0)