| 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 c4df888078ec3df7853796bf91ca1b8b14595198..83b0391ab032ac27464d413e7b397e45f66e686b 100644
|
| --- a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
|
| +++ b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
|
| @@ -10,9 +10,8 @@ function service_worker_test(url, description) {
|
| messageChannel.port1.onmessage = t.step_func(onMessage);
|
| worker.postMessage({port:messageChannel.port2}, [messageChannel.port2]);
|
| }),
|
| - t.step_func(function(reason) {
|
| - assert_unreached('Registration should succeed, but failed: ' + reason.name);
|
| - }));
|
| + unreached_rejection(t, 'Registration should succeed, but failed')
|
| + );
|
|
|
| function onMessage(e) {
|
| assert_equals(e.data, 'pass');
|
| @@ -31,3 +30,10 @@ function unreached_func(test, desc) {
|
| assert_unreached(desc);
|
| });
|
| }
|
| +
|
| +// Rejection-specific helper that provides more details
|
| +function unreached_rejection(test, prefix) {
|
| + return test.step_func(function(reason) {
|
| + assert_unreached(prefix + ': ' + reason.name);
|
| + });
|
| +}
|
|
|