From 37ec34b50448fa808c76497ea220f528579bcbf3 Mon Sep 17 00:00:00 2001 From: Yoav Weiss Date: Tue, 28 Apr 2020 11:38:53 +0000 Subject: [PATCH] Bug 1633704 [wpt PR 23087] - [server-timing] Populate values for NavigationTiming, a=testonly Automatic update from web-platform-tests [server-timing] Populate values for NavigationTiming Currently, Navigation Timing's Server Timing values are populated when the entry is first created, which happens when it is first queried. For long documents, that can happen before the body is loaded, which is the point in which the response is set on the NavigationTiming entry's TimingInfo. This CL fixes that, by setting the response on the TimingInfo earlier, at the document's commit time. Change-Id: I10522342a7d92560167bdb7d33956823e588d9d8 Bug: 1068937 Change-Id: I10522342a7d92560167bdb7d33956823e588d9d8 -- wpt-commits: 0084aa71d4d4935fcbb43bd8122328da9d305098 wpt-pr: 23087 --- .../navigation-timing-trickle.https.html | 20 ++++++++++ .../resources/navigation-timing.html | 38 +++++++++++++++++++ .../resources/navigation-timing.html.headers | 1 + 3 files changed, 59 insertions(+) create mode 100644 testing/web-platform/tests/server-timing/navigation-timing-trickle.https.html create mode 100644 testing/web-platform/tests/server-timing/resources/navigation-timing.html create mode 100644 testing/web-platform/tests/server-timing/resources/navigation-timing.html.headers diff --git a/testing/web-platform/tests/server-timing/navigation-timing-trickle.https.html b/testing/web-platform/tests/server-timing/navigation-timing-trickle.https.html new file mode 100644 index 000000000000..3121dc01cdda --- /dev/null +++ b/testing/web-platform/tests/server-timing/navigation-timing-trickle.https.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/testing/web-platform/tests/server-timing/resources/navigation-timing.html b/testing/web-platform/tests/server-timing/resources/navigation-timing.html new file mode 100644 index 000000000000..e6b1ba486602 --- /dev/null +++ b/testing/web-platform/tests/server-timing/resources/navigation-timing.html @@ -0,0 +1,38 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/server-timing/resources/navigation-timing.html.headers b/testing/web-platform/tests/server-timing/resources/navigation-timing.html.headers new file mode 100644 index 000000000000..ad018b70fd8f --- /dev/null +++ b/testing/web-platform/tests/server-timing/resources/navigation-timing.html.headers @@ -0,0 +1 @@ +Server-Timing: metric1; dur=1.1; desc=document, metric1; dur=1.2; desc=document