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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js

Issue 2550363002: Add LayoutTests for URL list of Response (Closed)
Patch Set: Created 4 years 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/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
});

Powered by Google App Engine
This is Rietveld 408576698