Layout Test http/wpt/fetch/response-opaque-clone.html is sometimes timing out on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=194525
<rdar://problem/48012229>
Reviewed by Alex Christensen.
Test is no longer flaky on MacOS.
As per flakiness dashboard, it sometimes times out on iOS simulator.
It sometimes passes after running for 20 seconds.
Mark it as Slow and improve the test to output more sub-tests.
Removed unnecessary removal of cache since test runner will clear them at the end of the test.
* http/wpt/fetch/response-opaque-clone-expected.txt:
* http/wpt/fetch/response-opaque-clone.html:
* platform/ios-simulator-wk2/TestExpectations:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@244150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9a3afbc..7308298 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,21 @@
+2019-04-10 Youenn Fablet <youenn@apple.com>
+
+ Layout Test http/wpt/fetch/response-opaque-clone.html is sometimes timing out on iOS simulator
+ https://bugs.webkit.org/show_bug.cgi?id=194525
+ <rdar://problem/48012229>
+
+ Reviewed by Alex Christensen.
+
+ Test is no longer flaky on MacOS.
+ As per flakiness dashboard, it sometimes times out on iOS simulator.
+ It sometimes passes after running for 20 seconds.
+ Mark it as Slow and improve the test to output more sub-tests.
+ Removed unnecessary removal of cache since test runner will clear them at the end of the test.
+
+ * http/wpt/fetch/response-opaque-clone-expected.txt:
+ * http/wpt/fetch/response-opaque-clone.html:
+ * platform/ios-simulator-wk2/TestExpectations:
+
2019-04-10 Justin Fan <justin_fan@apple.com>
[Web GPU] Indexed drawing and GPUCommandEncoder crash prevention
diff --git a/LayoutTests/http/wpt/fetch/response-opaque-clone-expected.txt b/LayoutTests/http/wpt/fetch/response-opaque-clone-expected.txt
index d344988..a5eb0f1 100644
--- a/LayoutTests/http/wpt/fetch/response-opaque-clone-expected.txt
+++ b/LayoutTests/http/wpt/fetch/response-opaque-clone-expected.txt
@@ -1,3 +1,6 @@
PASS Check opaque response can be cloned and cached correctly
+PASS fetched response
+PASS cloned response
+PASS cached response
diff --git a/LayoutTests/http/wpt/fetch/response-opaque-clone.html b/LayoutTests/http/wpt/fetch/response-opaque-clone.html
index 1faf15a..a9a2f58 100644
--- a/LayoutTests/http/wpt/fetch/response-opaque-clone.html
+++ b/LayoutTests/http/wpt/fetch/response-opaque-clone.html
@@ -11,41 +11,46 @@
<script src="/common/get-host-info.sub.js"></script>
<script>
-function testResponseOpacity(response, test, testName)
+function testResponseOpacity(response, testName)
{
- assert_equals(response.type, "opaque", testName + " type");
- assert_equals(response.status, 0, testName + " status");
- assert_equals(response.statusText, "", testName + " statusText");
- assert_equals(response.url, "", testName + " url");
- assert_false(response.redirected, testName + " redirected");
- assert_true(response.headers.values().next().done, testName + " headers");
- assert_equals(response.body, null, testName + " opaque response body should be null");
+ test(() => {
+ assert_equals(response.type, "opaque", testName + " type");
+ assert_equals(response.status, 0, testName + " status");
+ assert_equals(response.statusText, "", testName + " statusText");
+ assert_equals(response.url, "", testName + " url");
+ assert_false(response.redirected, testName + " redirected");
+ assert_true(response.headers.values().next().done, testName + " headers");
+ assert_equals(response.body, null, testName + " opaque response body should be null");
+ }, testName);
}
-promise_test(async function(test) {
+
+promise_test(async function() {
var request = new Request(get_host_info().HTTP_REMOTE_ORIGIN, { mode: "no-cors" });
var response = await fetch(request);
- testResponseOpacity(response, test, "fetched response");
+ testResponseOpacity(response, "fetched response");
var clone = response.clone();
- testResponseOpacity(clone, test, "cloned response");
+ testResponseOpacity(clone, "cloned response");
var buffer = await clone.arrayBuffer();
assert_equals(buffer.byteLength, 0, "cloned opaque response buffer should be null");
// WK1 does not support Cache API yet.
- if (!self.caches)
+ if (!self.caches) {
+ test(() => {
+ }, "cached response");
return;
+ }
var cache = await self.caches.open("test");
await cache.put(request, response);
var cached = await cache.match(request.url);
- testResponseOpacity(cached, test, "cached response")
+ testResponseOpacity(cached, "cached response")
buffer = await cached.arrayBuffer();
assert_equals(buffer.byteLength, 0, "cached opaque response buffer should be null");
- await self.caches.delete("test");
}, "Check opaque response can be cloned and cached correctly");
</script>
</body>
diff --git a/LayoutTests/platform/ios-simulator-wk2/TestExpectations b/LayoutTests/platform/ios-simulator-wk2/TestExpectations
index 36bd5d9..e34e61e 100644
--- a/LayoutTests/platform/ios-simulator-wk2/TestExpectations
+++ b/LayoutTests/platform/ios-simulator-wk2/TestExpectations
@@ -78,6 +78,7 @@
webkit.org/b/196357 storage/indexeddb/modern/idbtransaction-objectstore-failures-private.html [ Pass Failure ]
webkit.org/b/196358 http/wpt/cache-storage/quota-third-party.https.html [ Pass Failure ]
+http/wpt/fetch/response-opaque-clone.html [ Slow ]
webkit.org/b/196376 [ Debug ] storage/domstorage/localstorage/private-browsing-affects-storage.html [ Pass Failure ]