Skip to content

Commit 5c03a36

Browse files
thefrog-ghchromium-wpt-export-bot
authored andcommitted
Await calls to configureServer in DBSC WPTs
`configureServer` is async, so calls to it should be awaited. Change-Id: Iaa3f975582ec8348c183771b5297daa636d4fff2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6858412 Commit-Queue: thefrog <[email protected]> Reviewed-by: Daniel Rubery <[email protected]> Cr-Commit-Position: refs/heads/main@{#1503608}
1 parent e8d9480 commit 5c03a36

16 files changed

+22
-22
lines changed

device-bound-session-credentials/allowed-refresh-initiators.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
const expectedCookieAndAttributes = `${expectedCookieAndValue};${expectedCookieAttributes}`;
4343
addCookieAndSessionCleanup(t);
4444

45-
configureServer({ allowedRefreshInitiators: [get_host_info().NOTSAMESITE_HOST],
45+
await configureServer({ allowedRefreshInitiators: [get_host_info().NOTSAMESITE_HOST],
4646
cookieDetails: [ {attributes: expectedCookieAttributes} ],
4747
});
4848

device-bound-session-credentials/credentials-matching.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
addCookieAndSessionCleanup(t);
1919

2020
// Configure server to set the session credentials and the associated Set-Cookie header.
21-
configureServer({ cookieDetails: [{ attributes: expectedAttributes }] });
21+
await configureServer({ cookieDetails: [{ attributes: expectedAttributes }] });
2222

2323
// Prompt starting a session, and wait until registration completes.
2424
const loginResponse = await fetch('login.py');

device-bound-session-credentials/debug-header.https.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
await waitForCookie(expectedCookieAndValue, /*expectCookie=*/true);
2121

2222
// Configure server to fail to refresh
23-
configureServer({ refreshEndpointUnavailable: true });
23+
await configureServer({ refreshEndpointUnavailable: true });
2424

2525
// Expire the cookie. The server will attempt a refresh, but fail.
2626
expireCookie(expectedCookieAndAttributes);
@@ -47,7 +47,7 @@
4747
await waitForCookie(expectedCookieAndValue, /*expectCookie=*/true);
4848

4949
// Configure server to fail to refresh
50-
configureServer({ refreshEndpointUnavailable: true });
50+
await configureServer({ refreshEndpointUnavailable: true });
5151

5252
// Expire the cookie. The server will attempt a refresh, but fail.
5353
expireCookie(expectedCookieAndAttributes);
@@ -85,7 +85,7 @@
8585
addCookieAndSessionCleanup(t);
8686

8787
// Configure server to configure cookies for next two created sessions.
88-
configureServer({
88+
await configureServer({
8989
cookieDetailsForNextRegisteredSessions: [[{ nameAndValue: expectedCookieAndValue1 }], [{ nameAndValue: expectedCookieAndValue2 }]]
9090
});
9191

@@ -96,7 +96,7 @@
9696
await waitForCookie(expectedCookieAndValue2, /*expectCookie=*/true);
9797

9898
// Configure server to fail to refresh
99-
configureServer({ refreshEndpointUnavailable: true });
99+
await configureServer({ refreshEndpointUnavailable: true });
100100

101101
// Expire the cookie. The server will attempt a refresh, but fail.
102102
expireCookie(expectedCookieAndAttributes1);

device-bound-session-credentials/include-site.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
const expectedCookieAndAttributes = `${expectedCookieAndValue};Domain=${location.hostname};Path=/device-bound-session-credentials`;
1414
addCookieAndSessionCleanup(t);
1515

16-
configureServer({ includeSite });
16+
await configureServer({ includeSite });
1717

1818
// Prompt starting a session, and wait until registration completes.
1919
const loginResponse = await fetch('login.py');

device-bound-session-credentials/multiple-credentials.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
addCookieAndSessionCleanup(t);
1919

2020
// Configure server to set two cookies in the session instruction credentials.
21-
configureServer({ cookieDetails: [
21+
await configureServer({ cookieDetails: [
2222
{ nameAndValue: expectedCookieAndValue2, attributes: expectedAttributes2 },
2323
{ nameAndValue: expectedCookieAndValue1, attributes: expectedAttributes1 },
2424
]});

device-bound-session-credentials/multiple-registrations.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
addCookieAndSessionCleanup(t);
1717

1818
// Configure server to configure cookies for next two created sessions.
19-
configureServer({
19+
await configureServer({
2020
cookieDetailsForNextRegisteredSessions: [[{ nameAndValue: expectedCookieAndValue1 }], [{ nameAndValue: expectedCookieAndValue2 }]]
2121
});
2222

device-bound-session-credentials/refresh-does-not-send-challenge.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
addCookieAndSessionCleanup(t);
1515

1616
// Configure server to avoid sending back a challenge during refresh.
17-
configureServer({ refreshSendsChallenge: false });
17+
await configureServer({ refreshSendsChallenge: false });
1818

1919
// Prompt starting a session, and wait until registration completes.
2020
const loginResponse = await fetch('login.py');

device-bound-session-credentials/refresh-replaces-config.https.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
assert_equals(alternateAuthResponse.status, 401);
3232

3333
// Configure server to change the cookie in the session config on next refresh.
34-
configureServer({ cookieDetails: [{ nameAndValue: expectedCookieAndValue2 }] });
34+
await configureServer({ cookieDetails: [{ nameAndValue: expectedCookieAndValue2 }] });
3535

3636
// Expire the first cookie and send a request, which triggers the refresh with the new session config.
3737
expireCookie(expectedCookieAndAttributes1);
@@ -76,7 +76,7 @@
7676
assert_equals(authResponse.status, 200);
7777

7878
// Configure server to change the session identifier in the session config on next refresh.
79-
configureServer({ responseSessionIdOverride: 12345 });
79+
await configureServer({ responseSessionIdOverride: 12345 });
8080

8181
// Expire the first cookie and send a request, which triggers the refresh with the new session config.
8282
expireCookie(expectedCookieAndAttributes);

device-bound-session-credentials/refresh-with-continue-false.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
addCookieAndSessionCleanup(t);
1515

1616
// Configure server to end the session upon refresh.
17-
configureServer({ shouldRefreshEndSession: true });
17+
await configureServer({ shouldRefreshEndSession: true });
1818

1919
// Prompt starting a session, and wait until registration completes.
2020
const loginResponse = await fetch('login.py');

device-bound-session-credentials/registration-sends-challenge.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
addCookieAndSessionCleanup(t);
1515

1616
// Configure server to send back a challenge during registration.
17-
configureServer({ registrationSendsChallenge: true });
17+
await configureServer({ registrationSendsChallenge: true });
1818

1919
// Prompt starting a session, and wait until registration completes.
2020
const loginResponse = await fetch('login.py');

0 commit comments

Comments
 (0)