Skip to content

Commit

Permalink
Bug 1566056 [wpt PR 17832] - [Navigation timing] Add secure connectio…
Browse files Browse the repository at this point in the history
…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
Yoav Weiss authored and jgraham committed Jul 24, 2019
1 parent bbddc94 commit 682e181
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
@@ -0,0 +1,8 @@
<!doctype html>
<script>
window.addEventListener("message", e => {
window.top.postMessage(e.data, "*");
});
</script>
<iframe src="secure-connection-test.html">

@@ -0,0 +1,3 @@
Connection: Keep-Alive
Content-Length: 170

@@ -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>
@@ -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">

0 comments on commit 682e181

Please sign in to comment.