Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/chromium/resources/memory-cache-controlled.html |
| diff --git a/LayoutTests/http/tests/serviceworker/chromium/resources/memory-cache-controlled.html b/LayoutTests/http/tests/serviceworker/chromium/resources/memory-cache-controlled.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eeb4f57ec9b48521aacab1a1e41c47f4b6274185 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/serviceworker/chromium/resources/memory-cache-controlled.html |
| @@ -0,0 +1,13 @@ |
| +<script> |
| +var callback; |
| + |
| +function getJSON(url) { |
|
horo
2014/10/10 06:27:38
nit: getJSONP is better
nhiroki
2014/10/10 07:33:13
Done.
|
| + var sc = document.createElement('script'); |
| + sc.src = url; |
| + document.body.appendChild(sc); |
| + return new Promise(function(resolve) { |
| + // This callback function is called by appending a script element. |
| + callback = function(data) { resolve(data); } |
| + }); |
| +} |
| +</script> |