Bug 1189681 Fix wpt oninstall-script-error.https.html. r=baku

This commit is contained in:
Ben Kelly 2015-11-09 11:13:09 -08:00
parent 386cb9ef1b
commit 71a771bb4b
2 changed files with 8 additions and 10 deletions

View File

@ -1,8 +0,0 @@
[oninstall-script-error.https.html]
type: testharness
[install handler throws an error that is cancelled]
expected: FAIL
[install handler throws an error and prevents default]
expected: FAIL

View File

@ -45,15 +45,21 @@ function make_test(name, script, expect_install) {
script: 'resources/oninstall-throw-error-from-nested-event-worker.js',
expect_install: true
},
// The following two cases test what happens when the ServiceWorkerGlobalScope
// 'error' event handler cancels the resulting error event. Since the
// original 'install' event handler through, the installation should still
// be stopped in this case. See:
// https://github.com/slightlyoff/ServiceWorker/issues/778
{
name: 'install handler throws an error that is cancelled',
script: 'resources/oninstall-throw-error-then-cancel-worker.js',
expect_install: true
expect_install: false
},
{
name: 'install handler throws an error and prevents default',
script: 'resources/oninstall-throw-error-then-prevent-default-worker.js',
expect_install: true
expect_install: false
}
].forEach(function(test_case) {
make_test(test_case.name, test_case.script, test_case.expect_install);