diff --git a/resource-timing/TAO-crossorigin-port.sub.html b/resource-timing/TAO-crossorigin-port.sub.html deleted file mode 100644 index 0601217d0ae3a7..00000000000000 --- a/resource-timing/TAO-crossorigin-port.sub.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - -Resource Timing TAO - "null" and opaque origin - - - - - - - -

Description

-

This test validates that for a cross origin resource with different ports, the timing allow check algorithm will fail when the value of Timing-Allow-Origin value has the right host but the wrong port in it.

-
- - - - diff --git a/resource-timing/TAO-port-mismatch-means-crossorigin.html b/resource-timing/TAO-port-mismatch-means-crossorigin.html new file mode 100644 index 00000000000000..1dc27fcc373039 --- /dev/null +++ b/resource-timing/TAO-port-mismatch-means-crossorigin.html @@ -0,0 +1,35 @@ + + + + +TAO - port mismatch must fail the check + + + + + + + + + +

Description

+

This test validates that for a cross origin resource with different ports, +the timing allow check algorithm will fail when the value of +Timing-Allow-Origin value has the right host but the wrong port in it.

+ + diff --git a/resource-timing/resources/entry-invariants.js b/resource-timing/resources/entry-invariants.js index eb885e6de20d04..fa852555724f57 100644 --- a/resource-timing/resources/entry-invariants.js +++ b/resource-timing/resources/entry-invariants.js @@ -164,7 +164,32 @@ const invariants = { assert_equals(entry.fetchStart, entry.startTime, "fetchStart must equal startTime"); + }, + + assert_tao_failure_resource: entry => { + assert_equals(entry.entryType, "resource", "entryType must always be 'resource'"); + + assert_positive_(entry, [ + "startTime", + "duration", + ]); + + assert_zeroed_(entry, [ + "redirectStart", + "redirectEnd", + "domainLookupStart", + "domainLookupEnd", + "connectStart", + "connectEnd", + "secureConnectionStart", + "requestStart", + "responseStart", + "transferSize", + "encodedBodySize", + "decodedBodySize", + ]); } + }; // Given a resource-loader, a path (a relative path or absolute URL), and a