Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1566056 [wpt PR 17832] - [Navigation timing] Add secure connectio…
…n start reuse test, a=testonly Automatic update from web-platform-tests [Navigation timing] Add secure connection start reuse test During the review of w3c/navigation-timing#106 it was noted that secureConnectionStart's behavior with regards to connection reuse and navigation timing is not well-tested. This CL adds such a test. Change-Id: I91d7cbfe4f1ee58a72b4a647a38bd58d4ffca693 Bug: 977519 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1702022 Commit-Queue: Yoav Weiss <yoavweiss@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#677521} -- wpt-commits: 391c8f12e270cf0cadb26dc06b5d9984afe34a4c wpt-pr: 17832
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!doctype html> | ||
<script> | ||
window.addEventListener("message", e => { | ||
window.top.postMessage(e.data, "*"); | ||
}); | ||
</script> | ||
<iframe src="secure-connection-test.html"> | ||
|
3 changes: 3 additions & 0 deletions
3
...ing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html.headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Connection: Keep-Alive | ||
Content-Length: 170 | ||
|
13 changes: 13 additions & 0 deletions
13
testing/web-platform/tests/navigation-timing/resources/secure-connection-test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<script> | ||
const entries = performance.getEntriesByType("navigation"); | ||
if (!entries) { | ||
window.top.postMessage("FAIL - not supported", "*"); | ||
} | ||
const entry = entries[0]; | ||
if (entry.secureConnectionStart != entry.fetchStart) { | ||
window.top.postMessage("FAIL - unexpected secureConnectionStart value of " + | ||
entry.secureConnectionStart + " does not equal " + entry.fetchStart, "*"); | ||
} | ||
window.top.postMessage("PASS", "*"); | ||
</script> |
15 changes: 15 additions & 0 deletions
15
testing/web-platform/tests/navigation-timing/secure-connection-start-reuse.https.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Navigation Timing secureconnectionstart reuse</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
const t = async_test("Test that secureConnectionStart value is as expected when reused"); | ||
window.addEventListener("message", t.step_func_done(e => { | ||
assert_equals(e.data, "PASS"); | ||
})); | ||
</script> | ||
<iframe src="resources/secure-connection-interim.html"> | ||
|