Bug 1189678 - check if worker is already active. r=bkelly

Similar to other tests, the registration process allows workers to activate right after install.

Update web-platform-tests expected data

--HG--
extra : commitid : EnJ0U5Ns3cn
extra : rebase_source : 17b002ca8e1d2e166c8b09cf01f6e8b2fd98d152
This commit is contained in:
Nikhil Marathe 2015-08-21 17:55:50 -07:00
Родитель c04b01b1ed
Коммит 4c9e7f769a
2 изменённых файлов: 6 добавлений и 15 удалений

Просмотреть файл

@ -1,18 +1,3 @@
[onactivate-script-error.https.html]
type: testharness
expected: ERROR
[activate handler throws an error]
expected: FAIL
[activate handler throws an error, error handler does not cancel]
expected: FAIL
[activate handler dispatches an event that throws an error]
expected: FAIL
[activate handler throws an error that is cancelled]
expected: FAIL
[activate handler throws an error and prevents default]
expected: FAIL

Просмотреть файл

@ -37,6 +37,12 @@ function make_test(name, script) {
})
.then(function() {
// Activate should succeed regardless of script errors.
if (registration.active && registration.active.state == 'activated') {
return Promise.resolve();
} else if (registration.active) {
return wait_for_activate(registration.active);
}
return wait_for_activate(registration.waiting);
});
}, name);