Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html | 
| diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html b/LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html | 
| index 96ca60d46be774c90c562a52fc37ed69bf7c3275..b0faac22c4916e10155e128f0f130d56936081aa 100644 | 
| --- a/LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html | 
| +++ b/LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html | 
| @@ -24,7 +24,11 @@ navigator.serviceWorker.getRegistration(SCOPE) | 
| }) | 
| .then(function(worker) { | 
| worker.addEventListener('statechange', on_state_change); | 
| - }); | 
| + }) | 
| + .catch(function(reason) { | 
| + window.parent.postMessage({results: 'FAILURE: ' + reason.message}, | 
| + host_info['HTTP_ORIGIN']); | 
| + }); | 
| function on_state_change(event) { | 
| if (event.target.state != 'activated') | 
| @@ -42,6 +46,10 @@ function on_message(e) { | 
| }) | 
| .then(function() { | 
| window.parent.postMessage(e.data, host_info['HTTP_ORIGIN']); | 
| - }); | 
| + }) | 
| + .catch(function(reason) { | 
| + window.parent.postMessage({results: 'FAILURE: ' + reason.message}, | 
| + host_info['HTTP_ORIGIN']); | 
| 
 
falken
2014/10/24 06:54:54
Note that Promises can reject with anything, so .m
 
 | 
| + }); | 
| } | 
| </script> |