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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.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/script-tests/response.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js
index 66bccf2d4f520d9c57ca4ac6591741deeb8012ed..eae13f905bcdffdc21d25d34351e628dfed7ab24 100644
--- a/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js
+++ b/third_party/WebKit/LayoutTests/http/tests/fetch/script-tests/response.js
@@ -25,6 +25,11 @@ test(function() {
'Default Response.statusText should be \'OK\'');
assert_equals(size(response.headers), 0,
'Default Response should not have any header.');
+ if (self.internals) {
+ var urlList = self.internals.getInternalResponseURLList(response);
+ assert_equals(size(urlList), 0,
falken 2016/12/09 01:54:15 I think size() is defined in fetch-test-helpers.js
horo 2016/12/09 05:04:11 Done.
+ 'The URL list of Default Response should not be empty.');
falken 2016/12/09 01:54:15 The description seems to contradict the assertion.
horo 2016/12/09 05:04:11 Done.
+ }
response.status = 394;
response.statusText = 'Sesame Street';
@@ -98,6 +103,11 @@ test(function() {
'Response.headers should have Content-Type');
assert_equals(response.headers.get('Content-Type'), 'audio/wav',
'Content-Type of Response.headers should be set');
+ if (self.internals) {
+ var urlList = self.internals.getInternalResponseURLList(response);
+ assert_equals(size(urlList), 0,
+ 'The URL list of generated Response should not be empty.');
falken 2016/12/09 01:54:15 ditto with above
horo 2016/12/09 05:04:11 Done.
+ }
response = new Response(new Blob(['dummy'], {type: 'audio/wav'}),
{

Powered by Google App Engine
This is Rietveld 408576698