Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html

Issue 2893793004: Upstream service wrkr "respond with" tests to WPT (Closed)
Patch Set: Remove declaration of unused binding Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/respond-with-response-body-with-invalid-chunk.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html
similarity index 70%
rename from third_party/WebKit/LayoutTests/http/tests/serviceworker/respond-with-response-body-with-invalid-chunk.html
rename to third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html
index 075c48acf6c188b08342ffc2bf7293a0f11da0e1..fd799cddebd30d453bee6a446e1b3ba53076188a 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/respond-with-response-body-with-invalid-chunk.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-event-respond-with-response-body-with-invalid-chunk.https.html
@@ -3,16 +3,17 @@
<title>respondWith with response body having invalid chunks</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
-<script src="resources/test-helpers.js"></script>
+<script src="resources/test-helpers.sub.js"></script>
<script>
+'use strict';
+
const WORKER =
- 'resources/respond-with-response-body-with-invalid-chunk-worker.js';
+ 'resources/fetch-event-respond-with-response-body-with-invalid-chunk-worker.js';
const SCOPE =
- 'resources/respond-with-response-body-with-invalid-chunk-iframe.html';
-var resolve_done;
-var done_was_called = new Promise(resolve => resolve_done = resolve);
+ 'resources/fetch-event-respond-with-response-body-with-invalid-chunk-iframe.html';
// Called by the iframe when done.
-function done(result) { resolve_done(result); }
+var done;
+var done_was_called = new Promise(resolve => done = resolve);
// This test creates an controlled iframe that makes a fetch request. The
// service worker returns a response with a body stream containing an invalid
@@ -24,6 +25,9 @@ promise_test(t => {
return wait_for_state(t, reg.installing, 'activated');
})
.then(() => with_iframe(SCOPE))
+ .then(frame => {
+ t.add_cleanup(() => frame.remove())
+ })
.then(() => done_was_called)
.then(result => assert_equals(result, 'PASS'));
}, 'Response with a ReadableStream having non-Uint8Array chunks should be transferred as errored');

Powered by Google App Engine
This is Rietveld 408576698