Add (entirely incorrect) fetching of ServiceWorker scripts.
[WebKit-https.git] / LayoutTests / http / tests / workers / service / resources / basic-register.js
index e7516fe..3a1e63b 100644 (file)
@@ -6,6 +6,16 @@ function done()
 navigator.serviceWorker.register("resources/empty-worker.js", { })
 .then(function(r) {
        console.log("Registered!");
+}, function(e) {
+       console.log("Registration failed with error: " + e);
+})
+.catch(function(e) {
+       console.log("Exception registering: " + e);
+});
+
+navigator.serviceWorker.register("resources/empty-worker-doesnt-exist.js", { })
+.then(function(r) {
+       console.log("Registered!");
        done();
 }, function(e) {
        console.log("Registration failed with error: " + e);