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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/response-content-worker.js

Issue 435453002: [ServiceWorker] Update formatting for tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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/serviceworker/resources/response-content-worker.js
diff --git a/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js b/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
index 2c657cd8752b8a0babbf82586a0f0ef96a877da5..e133b7f57570d83cd347073f5d919ece45f51ca2 100644
--- a/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
+++ b/LayoutTests/http/tests/serviceworker/resources/response-content-worker.js
@@ -10,7 +10,8 @@ promise_test(function() {
return response.text()
.then(function(text) {
assert_equals(text, 'test string',
- 'Response body text should match the string on construction.');
+ 'Response body text should match the string on ' +
+ 'construction.');
});
}, 'Behavior of Response with string content.');
@@ -20,7 +21,8 @@ promise_test(function() {
var response = new Response(buffer);
assert_false(response.headers.has('Content-Type'),
- 'A Response constructed with ArrayBuffer should not have a content type.');
+ 'A Response constructed with ArrayBuffer should not have a ' +
+ 'content type.');
return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
@@ -36,8 +38,8 @@ promise_test(function() {
var response = new Response(intView);
assert_false(response.headers.has('Content-Type'),
- 'A Response constructed with ArrayBufferView ' +
- 'should not have a content type.');
+ 'A Response constructed with ArrayBufferView ' +
+ 'should not have a content type.');
return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
@@ -53,8 +55,8 @@ promise_test(function() {
var slice = intView.subarray(1, 4); // Should be [1, 2, 3]
var response = new Response(slice);
assert_false(response.headers.has('Content-Type'),
- 'A Response constructed with ArrayBufferView ' +
- 'should not have a content type.');
+ 'A Response constructed with ArrayBufferView ' +
+ 'should not have a content type.');
return response.arrayBuffer()
.then(function(buffer) {
var resultIntView = new Int32Array(buffer);
@@ -71,12 +73,12 @@ promise_test(function() {
var response = new Response(
'test string', {method: 'GET', headers: headers});
assert_false(response.bodyUsed,
- "bodyUsed is not set until Response is consumed.");
+ 'bodyUsed is not set until Response is consumed.');
var response2 = response.clone();
response.headers.set('Content-Language', 'en');
var response3;
assert_false(response2.bodyUsed,
- "bodyUsed should be false in clone of non-consumed Response.");
+ 'bodyUsed should be false in clone of non-consumed Response.');
assert_equals(
response2.headers.get('Content-Language'), 'ja', 'Headers of cloned ' +
'response should not change when original response headers are changed.');
@@ -85,17 +87,17 @@ promise_test(function() {
.then(function(text) {
assert_true(
response.bodyUsed,
- "bodyUsed should be true after a response is consumed.");
+ 'bodyUsed should be true after a response is consumed.');
assert_false(
- response2.bodyUsed, "bodyUsed should be false in Response cloned " +
- "before the original response was consumed.");
+ response2.bodyUsed, 'bodyUsed should be false in Response cloned ' +
+ 'before the original response was consumed.');
response3 = response.clone();
assert_true(response3.bodyUsed,
- "bodyUsed should be true in clone of consumed response.");
+ 'bodyUsed should be true in clone of consumed response.');
return response2.text();
})
.then(function(text) {
assert_equals(text, 'test string',
- 'Response clone response body text should match.');
+ 'Response clone response body text should match.');
});
}, 'Behavior of bodyUsed in Response and clone behavior.');

Powered by Google App Engine
This is Rietveld 408576698