Commit a99358ea authored by sandersd's avatar sandersd Committed by Commit bot

Fail tests if the license request XHR fails due to a network error.

Review URL: https://codereview.chromium.org/616933003

Cr-Commit-Position: refs/heads/master@{#297509}
parent d1033b6b
...@@ -226,7 +226,10 @@ Utils.sendRequest = function(requestType, responseType, message, serverURL, ...@@ -226,7 +226,10 @@ Utils.sendRequest = function(requestType, responseType, message, serverURL,
var xmlhttp = new XMLHttpRequest(); var xmlhttp = new XMLHttpRequest();
xmlhttp.responseType = responseType; xmlhttp.responseType = responseType;
xmlhttp.open(requestType, serverURL, true); 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) { xmlhttp.onload = function(e) {
if (this.status == 200) { if (this.status == 200) {
if (onSuccessCallbackFn) if (onSuccessCallbackFn)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment