Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: LayoutTests/http/tests/serviceworker/resources/test-helpers.js

Issue 238993003: ServiceWorker: "minimal" end-to-end sample as a W3C test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add 'parsed' to observed states Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/resources/test-helpers.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
index b863bbb5b08df5a6235e49399dab2c43c4ec0495..c4df888078ec3df7853796bf91ca1b8b14595198 100644
--- a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
+++ b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
@@ -20,3 +20,14 @@ function service_worker_test(url, description) {
}
});
}
+
+// FIXME: Replace this with test.unreached_func(desc) once testharness.js is updated
+// Use with unexpected event handlers or Promise rejection.
+// E.g.:
+// onbadevent = fail(t, 'Should only see good events');
+// Promise.then(...).catch(fail(t, 'Rejection is never fun'));
+function unreached_func(test, desc) {
+ return test.step_func(function() {
+ assert_unreached(desc);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698