| Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/request-body-blob-crash.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/request-body-blob-crash.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/request-body-blob-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4bf90afe580772c6e8e866cc871d44c14b44bcba
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/request-body-blob-crash.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<!-- This is in chromium/ because it tests we don't crash when a
|
| + request body blob is constructed asyncronously. -->
|
| +<meta charset="utf-8">
|
| +<title>request body</title>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../resources/test-helpers.js"></script>
|
| +<script>
|
| +var resolve_done;
|
| +var done_was_called = new Promise(resolve => resolve_done = resolve);
|
| +// Called by the iframe when done.
|
| +function done(result) { resolve_done(result); }
|
| +
|
| +// This test creates an controlled iframe that does a request with a request
|
| +// body blob. The service worker confirms it can read the blob and responds
|
| +// with 'Pass'.
|
| +promise_test(t => {
|
| + var worker = 'resources/request-body-blob-crash-worker.js';
|
| + var scope = 'resources/request-body-blob-crash-iframe.html';
|
| + var registration;
|
| + return service_worker_unregister_and_register(t, worker, scope)
|
| + .then(reg => {
|
| + registration = reg;
|
| + wait_for_state(t, reg.installing, 'activated');
|
| + })
|
| + .then(() => with_iframe(scope))
|
| + .then(() => done_was_called)
|
| + .then(result => {
|
| + assert_equals(result, 'Pass');
|
| + registration.unregister();
|
| + });
|
| + }, 'Service worker can read the request body blob and we dont crash');
|
| +</script>
|
|
|