| 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 d15c79208959436e8bb4e2e30575349d0a665b3a..5a98fcbc1ed7b950e4c75dea83933f25331cef86 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');
|
| @@ -38,3 +37,13 @@ function unreached_rejection(test, prefix) {
|
| assert_unreached(prefix + ': ' + reason.name);
|
| });
|
| }
|
| +
|
| +// FIXME: Clean up the iframe when the test completes.
|
| +function with_iframe(url, f) {
|
| + var frame = document.createElement('iframe');
|
| + frame.src = url;
|
| + frame.onload = function() {
|
| + f(frame);
|
| + };
|
| + document.body.appendChild(frame);
|
| +}
|
|
|