FormDataElement::lengthInBytes should use ThreadableBlobRegistry
[WebKit-https.git] / LayoutTests / http / tests / workers / service / service-worker-cache-api.https.html
index c413065..6879537 100644 (file)
@@ -6,14 +6,23 @@
 </head>
 <body>
 <script>
+var frame;
 promise_test(async (test) => {
-    var frame = await interceptedFrame("resources/service-worker-cache-api-worker.js", "/workers/service/resources/");
+    frame = await interceptedFrame("resources/service-worker-cache-api-worker.js", "/workers/service/resources/");
     var fetch = frame.contentWindow.fetch;
 
     var response = await fetch("/resources/square100.png.fromserviceworker");
     var buffer =  await response.arrayBuffer();
     assert_equals(buffer.byteLength, 12940);
 }, "Testing cache API in service worker");
+
+promise_test(async (test) => {
+    if (!self.internals)
+        return Promise.reject("internals required for this test");
+
+    var response = await frame.contentWindow.fetch("opaqueWithBlob");
+    assert_equals(await response.text(), "PASS");
+}, "Testing cache API with opaque response + blob");
 </script>
 </body>
 </html>