Bug 1460590 part 2 - Fix buggy tests. r?jgraham draft
authorNicholas Hurley <hurley@mozilla.com>
Fri, 01 Jun 2018 11:39:50 -0700
changeset 802952 88176655db1e9802cf2e5bcc89d640197a064de3
parent 802951 9845c96c58c98f36dd6c0ca1e92593860e24bf78
push id112007
push userbmo:hurley@mozilla.com
push dateFri, 01 Jun 2018 18:41:19 +0000
reviewersjgraham
bugs1460590
milestone62.0a1
Bug 1460590 part 2 - Fix buggy tests. r?jgraham Test 67.js was expecting us to only parse out one server-timing-metric, and ignore "junk" after. But, according to the spec, we are only to ignore junk up to the point where we see either (1) another metric, or (2) a server-timing-param. The header sent has a param (dur=123.4), and we were parsing that correctly. Test 68.js was similar, but this time there was another metric (comma- separated) in the header, which we correctly parsed. The test expected us to ignore it as "junk". MozReview-Commit-ID: 9nBhQ7nAdhX
testing/web-platform/meta/server-timing/server_timing_header-parsing.https.html.ini
testing/web-platform/tests/server-timing/resources/parsing/67.js
testing/web-platform/tests/server-timing/resources/parsing/68.js
--- a/testing/web-platform/meta/server-timing/server_timing_header-parsing.https.html.ini
+++ b/testing/web-platform/meta/server-timing/server_timing_header-parsing.https.html.ini
@@ -1,10 +1,3 @@
 [server_timing_header-parsing.https.html]
   [Untitled]
     expected: FAIL
-
-  [67.js - duration (0 ?== 123.4)]
-    expected: FAIL
-
-  [68.js - count (2 ?== 1)]
-    expected: FAIL
-
--- a/testing/web-platform/tests/server-timing/resources/parsing/67.js
+++ b/testing/web-platform/tests/server-timing/resources/parsing/67.js
@@ -1,1 +1,1 @@
-testServerTiming(document.currentScript, [{"name":"metric"}])
+testServerTiming(document.currentScript, [{"name":"metric","dur":123.4}])
--- a/testing/web-platform/tests/server-timing/resources/parsing/68.js
+++ b/testing/web-platform/tests/server-timing/resources/parsing/68.js
@@ -1,1 +1,1 @@
-testServerTiming(document.currentScript, [{"name":"metric1"}])
+testServerTiming(document.currentScript, [{"name":"metric1"},{"name":"metric2"}])