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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/audit.js

Issue 2768773002: Revert of Allow status = 0 when XHR is completed in Audit.loadFileFromUrl(). (Closed)
Patch Set: Created 3 years, 9 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
Index: third_party/WebKit/LayoutTests/webaudio/resources/audit.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
index ae615bdecdb482dc14f9198bd4010fe3a28753ac..bd3051a570d6abe54d71d85320f02c1ddd3a5e2b 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
@@ -1191,19 +1191,15 @@
function loadFileFromUrl (fileUrl) {
return new Promise((resolve, reject) => {
let xhr = new XMLHttpRequest();
- xhr.open('GET', fileUrl, true);
+ xhr.open('GET', fileUrl);
xhr.responseType = 'arraybuffer';
xhr.onload = () => {
- // |status = 0| is a workaround for the run-webkit-test server. We are
- // speculating the server quits the transaction prematurely without
- // completing the request.
- if (xhr.status === 200 || xhr.status === 0) {
+ if (xhr.status === 200) {
resolve(xhr.response);
} else {
let errorMessage = 'loadFile: Request failed when loading ' +
- fileUrl + '. ' + xhr.statusText + '. (status = ' +
- xhr.status + ')';
+ fileUrl + '. (' + xhr.statusText + ')';
if (reject) {
reject(errorMessage);
} else {

Powered by Google App Engine
This is Rietveld 408576698