[service-workers] Refactor tautological tests (#13043)

* [service-workers] Refactor tautological tests

Previously, these tests created Promise values which would be fulfilled
even when expectations were violated. This would cause the test harness
to interpret them as "passing" regardless of implementation status.

Remove the use of `Promise.prototype.catch` to ensure that promise
rejections which occur during test execution lead to test failure.
diff --git a/service-workers/service-worker/worker-interception.https.html b/service-workers/service-worker/worker-interception.https.html
index 4f14746..bf976a2 100644
--- a/service-workers/service-worker/worker-interception.https.html
+++ b/service-workers/service-worker/worker-interception.https.html
@@ -69,25 +69,11 @@
           return wait_for_state(t, r.installing, 'activated');
         })
       .then(function() {
-          return new Promise(function(resolve, reject) {
-              var w = new Worker(worker_url);
-              w.onmessage = function(e) {
-                resolve(e.data);
-              }
-
-              w.onerror = function(e) {
-                reject(e.message);
-              }
-            });
+          var w = new Worker(worker_url);
+          var watcher = new EventWatcher(t, w, ['message', 'error']);
+          return watcher.wait_for('error');
         })
-      .then(function(data) {
-          assert_unreached('intercepted cors response to a same-origin mode ' +
-                           'worker load should fail');
-          service_worker_unregister_and_done(t, scope);
-        })
-      .catch(function(e) {
-          assert_true(true, 'intercepted cors response to a same-origin mode ' +
-                            'worker load should fail');
+      .then(function() {
           service_worker_unregister_and_done(t, scope);
        });
   }, 'Verify worker script intercepted by cors response fails');
@@ -102,24 +88,11 @@
           return wait_for_state(t, r.installing, 'activated');
         })
       .then(function() {
-          return new Promise(function(resolve, reject) {
-              var w = new Worker(worker_url);
-              w.onmessage = function(e) {
-                resolve(e.data);
-              }
-
-              w.onerror = function(e) {
-                reject(e);
-                return true;
-              }
-            });
+          var w = new Worker(worker_url);
+          var watcher = new EventWatcher(t, w, ['message', 'error']);
+          return watcher.wait_for('error');
         })
-      .then(function(data) {
-          assert_unreached('intercepted no-cors worker load should fail');
-          service_worker_unregister_and_done(t, scope);
-        })
-      .catch(function(e) {
-          assert_true(true, 'intercepted no-cors worker load should fail');
+      .then(function() {
           service_worker_unregister_and_done(t, scope);
        });
   }, 'Verify worker script intercepted by no-cors cross-origin response fails');