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

Unified Diff: LayoutTests/http/tests/inspector/network-test.js

Issue 23464028: Add the responseType parameter to InspectorTest.makeXHR (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
Index: LayoutTests/http/tests/inspector/network-test.js
diff --git a/LayoutTests/http/tests/inspector/network-test.js b/LayoutTests/http/tests/inspector/network-test.js
index 3c531a6d49b343ae49bce8a6475ddf08bda5f43e..537b9000583fbfa5afb3e55affb2717fa01413ab 100644
--- a/LayoutTests/http/tests/inspector/network-test.js
+++ b/LayoutTests/http/tests/inspector/network-test.js
@@ -33,15 +33,15 @@ InspectorTest.resetInspectorResourcesData = function(callback)
InspectorTest.makeSimpleXHR = function(method, url, async, callback)
{
- InspectorTest.makeXHR(method, url, async, undefined, undefined, [], false, undefined, callback);
+ InspectorTest.makeXHR(method, url, async, undefined, undefined, [], false, undefined, undefined, callback);
}
InspectorTest.makeSimpleXHRWithPayload = function(method, url, async, payload, callback)
{
- InspectorTest.makeXHR(method, url, async, undefined, undefined, [], false, payload, callback);
+ InspectorTest.makeXHR(method, url, async, undefined, undefined, [], false, payload, undefined, callback);
}
-InspectorTest.makeXHR = function(method, url, async, user, password, headers, withCredentials, payload, callback)
+InspectorTest.makeXHR = function(method, url, async, user, password, headers, withCredentials, payload, type, callback)
{
var args = {};
args.method = method;
@@ -52,6 +52,7 @@ InspectorTest.makeXHR = function(method, url, async, user, password, headers, wi
args.headers = headers;
args.withCredentials = withCredentials;
args.payload = payload;
+ args.type = type;
var jsonArgs = JSON.stringify(args).replace(/\"/g, "\\\"");
function innerCallback(msg)
@@ -78,9 +79,10 @@ function makeSimpleXHRWithPayload(method, url, async, payload, callback)
makeXHR(method, url, async, undefined, undefined, [], false, payload, callback)
}
-function makeXHR(method, url, async, user, password, headers, withCredentials, payload, callback)
+function makeXHR(method, url, async, user, password, headers, withCredentials, payload, type, callback)
{
var xhr = new XMLHttpRequest();
+ xhr.responseType = type;
xhr.onreadystatechange = function()
{
if (xhr.readyState === XMLHttpRequest.DONE) {
@@ -98,7 +100,7 @@ function makeXHR(method, url, async, user, password, headers, withCredentials, p
function makeXHRForJSONArguments(jsonArgs)
{
var args = JSON.parse(jsonArgs);
- makeXHR(args.method, args.url, args.async, args.user, args.password, args.headers || [], args.withCredentials, args.payload, xhrLoadedCallback);
+ makeXHR(args.method, args.url, args.async, args.user, args.password, args.headers || [], args.withCredentials, args.payload, args.type, xhrLoadedCallback);
}

Powered by Google App Engine
This is Rietveld 408576698