Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(289)

Unified Diff: LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe.html

Issue 672423003: [ServiceWorker] Add error handling code fetch-mixed-content-iframe.html to avoid timeouts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698