Commit 70786e51 authored by horo@chromium.org's avatar horo@chromium.org

[ServiceWorker] Add test for the hanging bug in loading ServiceWorker script.

Chromium side fix patch: https://codereview.chromium.org/640923003

BUG=419999

Review URL: https://codereview.chromium.org/650193003

git-svn-id: svn://svn.chromium.org/blink/trunk@183971 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5c1517da
<!DOCTYPE html>
<title>Service Worker: Load flushed script</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/test-helpers.js"></script>
<script>
async_test(function(t) {
var scope = 'resources/load-flushed-script.html';
service_worker_unregister_and_register(
t, 'resources/load-flushed-script.php', scope)
.then(function(registration) {
return wait_for_update(t, registration);
})
.then(function(sw) {
service_worker_unregister_and_done(t, scope);
})
.catch(unreached_rejection(t));
},
'Don\'t hang while registering a flushed Service Worker script.',
{timeout: 10000});
</script>
<?php
header('Content-Type:application/javascript');
echo "// Empty script\r\n";
flush();
sleep(1);
?>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment