mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Initial work on job queues for service workers
This commit is contained in:
parent
6cc1976cca
commit
114c491111
11 changed files with 462 additions and 68 deletions
|
@ -14,6 +14,12 @@ test(function (){
|
|||
assert_true('serviceWorker' in navigator);
|
||||
}, "Test: Asserts ServiceWorkerContainer in Navigator");
|
||||
|
||||
promise_test(function() {
|
||||
return register_sw('resources/sw.js').then(function(sw_reg) {
|
||||
assert_equals(sw_reg.active.scriptURL, location.href.replace("service-worker-registration.html", "resources/sw.js"));
|
||||
});
|
||||
}, "Test: Active Service Worker ScriptURL property");
|
||||
|
||||
promise_test(function() {
|
||||
return register_sw('sw.js').then(function(sw_reg) {
|
||||
assert_class_string(sw_reg, "ServiceWorkerRegistration");
|
||||
|
@ -43,10 +49,4 @@ promise_test(function (p) {
|
|||
return promise_rejects(p, new TypeError(), register_sw('sw.js', './mal%5fformed/sco%5Cpe/'));
|
||||
}, "Test: Throws Error when Invalid Scope");
|
||||
|
||||
promise_test(function() {
|
||||
return register_sw('resources/sw.js').then(function(sw_reg) {
|
||||
assert_equals(sw_reg.active.scriptURL, location.href.replace("service-worker-registration.html", "resources/sw.js"));
|
||||
});
|
||||
}, "Test: Active Service Worker ScriptURL property");
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue