Index: third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js b/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js |
index 8646486fd68403396158e97d3173ec687fadc970..9f40eb5fa67d0cbdd54a2d8cb8ad7179c5a3243a 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js |
@@ -65,6 +65,17 @@ var checkFetchResponseType = function(type, url, data) { |
type, |
'type must match. url: ' + url); |
}; |
+var checkURLList = function(redirectedURLList, url, data) { |
+ if (!self.internals) |
+ return; |
+ var expectedURLList = [url].concat(redirectedURLList); |
+ assert_equals(data.fetchResult, |
+ 'resolved', |
+ 'fetchResult must be resolved. url = ' + url); |
+ assert_array_equals(data.urlList, |
+ expectedURLList, |
+ url + ' URL list should match'); |
+}; |
var showComment = function(url, data) { |
assert_true(!data.comment, 'Show comment: ' + data.comment + ' url: ' + url); |
@@ -354,6 +365,9 @@ function doFetch(request) { |
status: response.status, |
headers: headersToArray(response.headers), |
type: response.type, |
+ urlList: self.internals ? |
+ self.internals.getInternalResponseURLList(response) : |
+ [], |
response: response, |
originalURL: originalURL |
}); |