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

Unified Diff: media/test/data/eme_player_js/utils.js

Issue 616933003: Add error handler for license request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also log statusText. Created 6 years, 3 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: media/test/data/eme_player_js/utils.js
diff --git a/media/test/data/eme_player_js/utils.js b/media/test/data/eme_player_js/utils.js
index ca62cd1f7b2a1ff9662c123849eabe1975028eb9..b7d2d6d4f03d58eee5f8e45bbca7c1e612baad80 100644
--- a/media/test/data/eme_player_js/utils.js
+++ b/media/test/data/eme_player_js/utils.js
@@ -226,7 +226,10 @@ Utils.sendRequest = function(requestType, responseType, message, serverURL,
var xmlhttp = new XMLHttpRequest();
xmlhttp.responseType = responseType;
xmlhttp.open(requestType, serverURL, true);
-
+ xmlhttp.onerror = function(e) {
+ Utils.timeLog('Request status: ' + this.statusText);
+ Utils.failTest('FAILED: License request XHR failed with network error.');
+ };
xmlhttp.onload = function(e) {
if (this.status == 200) {
if (onSuccessCallbackFn)
« 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