Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/testutils.js |
| diff --git a/LayoutTests/http/tests/serviceworker/resources/testutils.js b/LayoutTests/http/tests/serviceworker/resources/testutils.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8e640693bb74a75ad76c8a979cab46ccaff7fe21 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/serviceworker/resources/testutils.js |
| @@ -0,0 +1,8 @@ |
| +function withIframe(url, f) { |
|
falken
2014/05/06 00:50:46
Can you add a FIXME that we should clean up the if
kinuko
2014/05/06 05:19:46
Done. (And moved this function into test-helpers.j
|
| + var frame = document.createElement('iframe'); |
| + frame.src = url; |
| + frame.onload = function() { |
| + f(frame); |
| + }; |
| + document.body.appendChild(frame); |
| +} |