| 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 9685b6fd6a386c28f738f179c0c2de45cfc94aca..af5509cadedfd626b1009966ca15ec314b325f64 100644
|
| --- a/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
|
| +++ b/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
|
| @@ -63,6 +63,18 @@ function with_iframe(url, f) {
|
| });
|
| }
|
|
|
| +function unload_iframe(iframe) {
|
| + var saw_unload = new Promise(function(resolve) {
|
| + iframe.contentWindow.addEventListener('unload', function() {
|
| + resolve();
|
| + });
|
| + });
|
| + iframe.src = '';
|
| + iframe.remove();
|
| + iframe = null;
|
| + return saw_unload;
|
| +}
|
| +
|
| function normalizeURL(url) {
|
| return new URL(url, document.location).toString().replace(/#.*$/, '');
|
| }
|
|
|