Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/fetch-request-redirect-iframe.html |
| diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html b/LayoutTests/http/tests/serviceworker/resources/fetch-request-redirect-iframe.html |
| similarity index 57% |
| copy from LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html |
| copy to LayoutTests/http/tests/serviceworker/resources/fetch-request-redirect-iframe.html |
| index 37c7c62ffaf38b0a906da928a56c054e04d9a873..95e191f22a4954682cbdc60fa21ab4f05a594dc2 100644 |
| --- a/LayoutTests/http/tests/serviceworker/resources/fetch-request-fallback-iframe.html |
| +++ b/LayoutTests/http/tests/serviceworker/resources/fetch-request-redirect-iframe.html |
| @@ -13,20 +13,23 @@ function xhr(url) { |
| }); |
| } |
| -function load_image(url, cross_origin) { |
| +function load_image(url) { |
| return new Promise(function(resolve, reject) { |
| var img = document.createElement('img'); |
| document.body.appendChild(img); |
| - img.onload = function() { |
| - resolve(); |
| - }; |
| - img.onerror = function() { |
| - reject(); |
| - }; |
| - if (cross_origin != '') { |
| - img.crossOrigin = cross_origin; |
| - } |
| + img.onload = function() { resolve(); }; |
|
yhirano
2015/08/18 07:56:48
[optional] img.onload = resolve;
Ditto bellow.
horo
2015/08/19 07:36:11
Done.
|
| + img.onerror = function() { reject(); }; |
| img.src = url; |
| }); |
| } |
| + |
| +function load_audio(url) { |
| + return new Promise(function(resolve, reject) { |
| + var audio = document.createElement('audio'); |
| + document.body.appendChild(audio); |
| + audio.oncanplay = function() { resolve(); }; |
| + audio.onerror = function() { reject(); }; |
| + audio.src = url; |
| + }); |
| +} |
| </script> |