Diff
Modified: trunk/LayoutTests/ChangeLog (239137 => 239138)
--- trunk/LayoutTests/ChangeLog 2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/ChangeLog 2018-12-13 01:23:04 UTC (rev 239138)
@@ -1,3 +1,30 @@
+2018-12-12 Joseph Pecoraro <[email protected]>
+
+ REGRESSION: [ MacOS iOS ] Layout Test http/wpt/resource-timing/rt-revalidate-requests.html is flaky timeout
+ https://bugs.webkit.org/show_bug.cgi?id=191207
+ <rdar://problem/45818891>
+
+ Reviewed by Devin Rousso.
+
+ Splitting this test up into separate tests eliminated flakiness
+ and timeouts for my system that would occasionally encounter them.
+
+ * TestExpectations:
+ Remove expectation for the test now that splitting up eliminated flakiness so far.
+
+ * http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js
+ Common code for the split out tests.
+
+ * http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests-1.html: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests-2.html: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests-3.html: Added.
+ * http/wpt/resource-timing/rt-revalidate-requests.html: Removed.
+ * http/wpt/resource-timing/rt-revalidate-requests-expected.txt: Removed.
+ Split out into separate tests.
+
2018-12-12 Chris Dumez <[email protected]>
[Mojave Release Wk2] Layout Test http/tests/cache/disk-cache/disk-cache-validation-attachment.html is flaky
Modified: trunk/LayoutTests/TestExpectations (239137 => 239138)
--- trunk/LayoutTests/TestExpectations 2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/TestExpectations 2018-12-13 01:23:04 UTC (rev 239138)
@@ -761,7 +761,6 @@
webkit.org/b/168357 http/wpt/resource-timing/rt-initiatorType-media.html [ Failure ]
webkit.org/b/168448 http/wpt/resource-timing/rt-shared-resource-in-frames.html [ Pass Failure ]
webkit.org/b/168448 http/wpt/resource-timing/rt-shared-resource-in-workers.html [ Pass Failure ]
-webkit.org/b/171511 http/wpt/resource-timing/rt-revalidate-requests.html [ Pass Failure ]
webkit.org/b/161312 imported/w3c/web-platform-tests/html/semantics/document-metadata/the-link-element/document-without-browsing-context.html [ Failure Pass ]
Copied: trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js (from rev 239137, trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html) (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/resources/rt-revalidate-utilities.sub.js 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,60 @@
+function createRevalidationURL({tao, crossOrigin}) {
+ let token = Math.random();
+ let content = encodeURIComponent("var revalidationTest = 1;");
+ let mimeType = encodeURIComponent("text/_javascript_");
+ let date = encodeURIComponent(new Date(2000, 1, 1).toGMTString());
+ let params = `content=${content}&mimeType=${mimeType}&date=${date}&tao=${tao ? true : false}`;
+
+ const path = "WebKit/resource-timing/resources/rt-revalidation-response.py";
+ if (crossOrigin)
+ return crossOriginURL(`${token}&${params}`, path);
+ return location.origin + `/${path}?${token}&${params}`;
+}
+
+function makeRequest(url, revalidation = false) {
+ let xhr = new XMLHttpRequest;
+ xhr.open("GET", url, true);
+ if (revalidation)
+ xhr.setRequestHeader("If-Modified-Since", new Date().toGMTString());
+ xhr.send();
+}
+
+function assertAlways(entry) {
+ assert_equals(entry.workerStart, 0, "entry should not have a workerStart time");
+ assert_equals(entry.secureConnectionStart, 0, "entry should not have a secureConnectionStart time");
+
+ assert_not_equals(entry.startTime, 0, "entry should have a non-0 fetchStart time");
+ assert_not_equals(entry.fetchStart, 0, "entry should have a non-0 startTime time");
+ assert_not_equals(entry.responseEnd, 0, "entry should have a non-0 responseEnd time");
+
+ assert_greater_than_equal(entry.fetchStart, entry.startTime, "fetchStart after startTime");
+ assert_greater_than_equal(entry.responseEnd, entry.fetchStart, "responseEnd after fetchStart");
+}
+
+function assertAllowedTimingData(entry) {
+ assert_greater_than_equal(entry.domainLookupStart || entry.fetchStart, entry.fetchStart, "domainLookupStart after fetchStart");
+ assert_greater_than_equal(entry.domainLookupEnd || entry.fetchStart, entry.domainLookupStart, "domainLookupEnd after domainLookupStart");
+ assert_greater_than_equal(entry.connectStart || entry.fetchStart, entry.domainLookupEnd, "connectStart after domainLookupEnd");
+ assert_greater_than_equal(entry.connectEnd || entry.fetchStart, entry.connectStart, "connectEnd after connectStart");
+ assert_greater_than_equal(entry.requestStart || entry.fetchStart, entry.connectEnd, "requestStart after connectEnd");
+ assert_greater_than_equal(entry.responseStart || entry.fetchStart, entry.requestStart, "responseStart after requestStart");
+ assert_greater_than_equal(entry.responseEnd || entry.fetchStart, entry.responseStart, "responseEnd after responseStart");
+}
+
+function assertDisallowedTimingData(entry) {
+ // These attributes must be zero:
+ // https://w3c.github.io/resource-timing/#cross-origin-resources
+ const keys = [
+ "redirectStart",
+ "redirectEnd",
+ "domainLookupStart",
+ "domainLookupEnd",
+ "connectStart",
+ "connectEnd",
+ "requestStart",
+ "responseStart",
+ "secureConnectionStart",
+ ];
+ for (let key of keys)
+ assert_equals(entry[key], 0, `entry ${key} must be zero for Cross Origin resource without passing Timing-Allow-Origin check`);
+}
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1-expected.txt 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,6 @@
+Resource Timing: ResourceTiming for revalidation requests
+
+
+PASS Same Origin network load
+PASS Same Origin revalidation load
+
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1.html (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1.html (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-1.html 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Resource Timing - ResourceTiming for revalidation requests</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<h1>Resource Timing: ResourceTiming for revalidation requests</h1>
+<div id="log"></div>
+<script>
+// Same Origin (revalidation request).
+
+let sameOriginURL = createRevalidationURL({tao: true, crossOrigin: false});
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertAllowedTimingData(entry);
+ });
+ makeRequest(sameOriginURL);
+ return promise;
+}, "Same Origin network load");
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertAllowedTimingData(entry);
+ });
+ makeRequest(sameOriginURL, true);
+ return promise;
+}, "Same Origin revalidation load");
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2-expected.txt 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,6 @@
+Resource Timing: ResourceTiming for revalidation requests
+
+
+PASS Cross Origin network load (no TimingAllow)
+PASS Cross Origin revalidation load (no TimingAllow)
+
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2.html (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2.html (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-2.html 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Resource Timing - ResourceTiming for revalidation requests</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<h1>Resource Timing: ResourceTiming for revalidation requests</h1>
+<div id="log"></div>
+<script>
+// Cross Origin (revalidation request) without Timing Allow.
+
+let crossOriginURLNoTao = createRevalidationURL({tao: false, crossOrigin: true});
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertDisallowedTimingData(entry);
+ });
+ makeRequest(crossOriginURLNoTao);
+ return promise;
+}, "Cross Origin network load (no TimingAllow)");
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertDisallowedTimingData(entry);
+ });
+ makeRequest(crossOriginURLNoTao, true);
+ return promise;
+}, "Cross Origin revalidation load (no TimingAllow)");
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3-expected.txt 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,6 @@
+Resource Timing: ResourceTiming for revalidation requests
+
+
+PASS Cross Origin network load (with TimingAllow)
+PASS Cross Origin revalidation load (with TimingAllow)
+
Added: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3.html (0 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3.html (rev 0)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-3.html 2018-12-13 01:23:04 UTC (rev 239138)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>Resource Timing - ResourceTiming for revalidation requests</title>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+</head>
+<body>
+<h1>Resource Timing: ResourceTiming for revalidation requests</h1>
+<div id="log"></div>
+<script>
+// Cross Origin (revalidation request) with Timing Allow.
+
+let crossOriginURLWithTao = createRevalidationURL({tao: true, crossOrigin: true});
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertAllowedTimingData(entry);
+ });
+ makeRequest(crossOriginURLWithTao);
+ return promise;
+}, "Cross Origin network load (with TimingAllow)");
+
+promise_test(function(t) {
+ let promise = observeResources(1).then(([entry]) => {
+ assertAlways(entry);
+ assertAllowedTimingData(entry);
+ });
+ makeRequest(crossOriginURLWithTao, true);
+ return promise;
+}, "Cross Origin revalidation load (with TimingAllow)");
+</script>
+</body>
+</html>
Deleted: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-expected.txt (239137 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-expected.txt 2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests-expected.txt 2018-12-13 01:23:04 UTC (rev 239138)
@@ -1,10 +0,0 @@
-Resource Timing: ResourceTiming for revalidation requests
-
-
-PASS Same Origin network load
-PASS Same Origin revalidation load
-PASS Cross Origin network load (no TimingAllow)
-PASS Cross Origin revalidation load (no TimingAllow)
-PASS Cross Origin network load (with TimingAllow)
-PASS Cross Origin revalidation load (with TimingAllow)
-
Deleted: trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html (239137 => 239138)
--- trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html 2018-12-13 01:19:22 UTC (rev 239137)
+++ trunk/LayoutTests/http/wpt/resource-timing/rt-revalidate-requests.html 2018-12-13 01:23:04 UTC (rev 239138)
@@ -1,143 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="utf-8">
-<title>Resource Timing - ResourceTiming for revalidation requests</title>
-<script src=""
-<script src=""
-<script src=""
-</head>
-<body>
-<h1>Resource Timing: ResourceTiming for revalidation requests</h1>
-<div id="log"></div>
-<script>
-const IncludeTimingOriginAllowHeaders = { Yes: true, No: false };
-function createRevalidationURL({tao, crossOrigin}) {
- let token = Math.random();
- let content = encodeURIComponent("var revalidationTest = 1;");
- let mimeType = encodeURIComponent("text/_javascript_");
- let date = encodeURIComponent(new Date(2000, 1, 1).toGMTString());
- let params = `content=${content}&mimeType=${mimeType}&date=${date}&tao=${tao ? true : false}`;
-
- const path = "WebKit/resource-timing/resources/rt-revalidation-response.py";
- if (crossOrigin)
- return crossOriginURL(`${token}&${params}`, path);
- return location.origin + `/${path}?${token}&${params}`;
-}
-
-function makeRequest(url, revalidation = false) {
- let xhr = new XMLHttpRequest;
- xhr.open("GET", url, true);
- if (revalidation)
- xhr.setRequestHeader("If-Modified-Since", new Date().toGMTString());
- xhr.send();
-}
-
-function assertAlways(entry) {
- assert_equals(entry.workerStart, 0, "entry should not have a workerStart time");
- assert_equals(entry.secureConnectionStart, 0, "entry should not have a secureConnectionStart time");
-
- assert_not_equals(entry.startTime, 0, "entry should have a non-0 fetchStart time");
- assert_not_equals(entry.fetchStart, 0, "entry should have a non-0 startTime time");
- assert_not_equals(entry.responseEnd, 0, "entry should have a non-0 responseEnd time");
-
- assert_greater_than_equal(entry.fetchStart, entry.startTime, "fetchStart after startTime");
- assert_greater_than_equal(entry.responseEnd, entry.fetchStart, "responseEnd after fetchStart");
-}
-
-function assertAllowedTimingData(entry) {
- assert_greater_than_equal(entry.domainLookupStart || entry.fetchStart, entry.fetchStart, "domainLookupStart after fetchStart");
- assert_greater_than_equal(entry.domainLookupEnd || entry.fetchStart, entry.domainLookupStart, "domainLookupEnd after domainLookupStart");
- assert_greater_than_equal(entry.connectStart || entry.fetchStart, entry.domainLookupEnd, "connectStart after domainLookupEnd");
- assert_greater_than_equal(entry.connectEnd || entry.fetchStart, entry.connectStart, "connectEnd after connectStart");
- assert_greater_than_equal(entry.requestStart || entry.fetchStart, entry.connectEnd, "requestStart after connectEnd");
- assert_greater_than_equal(entry.responseStart || entry.fetchStart, entry.requestStart, "responseStart after requestStart");
- assert_greater_than_equal(entry.responseEnd || entry.fetchStart, entry.responseStart, "responseEnd after responseStart");
-}
-
-function assertDisallowedTimingData(entry) {
- // These attributes must be zero:
- // https://w3c.github.io/resource-timing/#cross-origin-resources
- const keys = [
- "redirectStart",
- "redirectEnd",
- "domainLookupStart",
- "domainLookupEnd",
- "connectStart",
- "connectEnd",
- "requestStart",
- "responseStart",
- "secureConnectionStart",
- ];
- for (let key of keys)
- assert_equals(entry[key], 0, `entry ${key} must be zero for Cross Origin resource without passing Timing-Allow-Origin check`);
-}
-
-// Same Origin (revalidation request).
-
-let sameOriginURL = createRevalidationURL({tao: true, crossOrigin: false});
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertAllowedTimingData(entry);
- });
- makeRequest(sameOriginURL);
- return promise;
-}, "Same Origin network load");
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertAllowedTimingData(entry);
- });
- makeRequest(sameOriginURL, true);
- return promise;
-}, "Same Origin revalidation load");
-
-// Cross Origin (revalidation request) without Timing Allow.
-
-let crossOriginURLNoTao = createRevalidationURL({tao: false, crossOrigin: true});
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertDisallowedTimingData(entry);
- });
- makeRequest(crossOriginURLNoTao);
- return promise;
-}, "Cross Origin network load (no TimingAllow)");
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertDisallowedTimingData(entry);
- });
- makeRequest(crossOriginURLNoTao, true);
- return promise;
-}, "Cross Origin revalidation load (no TimingAllow)");
-
-// Cross Origin (revalidation request) with Timing Allow.
-
-let crossOriginURLWithTao = createRevalidationURL({tao: true, crossOrigin: true});
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertAllowedTimingData(entry);
- });
- makeRequest(crossOriginURLWithTao);
- return promise;
-}, "Cross Origin network load (with TimingAllow)");
-
-promise_test(function(t) {
- let promise = observeResources(1).then(([entry]) => {
- assertAlways(entry);
- assertAllowedTimingData(entry);
- });
- makeRequest(crossOriginURLWithTao, true);
- return promise;
-}, "Cross Origin revalidation load (with TimingAllow)");
-</script>
-</body>
-</html>