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

Side by Side Diff: LayoutTests/http/tests/serviceworker/resources/response-worker.js

Issue 287363004: ServiceWorker: support Response.{status,statusText,headers} [blink] (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 importScripts('worker-test-helpers.js');
2
3 test(function() {
4 var headers = new HeaderMap;
5 headers.set('Content-Language', 'ja');
6 headers.set('Content-Type', 'text/html; charset=UTF-8');
7 headers.set('X-ServiceWorker-Test', 'response test field');
8
9 var response = new Response({
10 status: 303,
11 statusText: 'See Other',
12 headers: headers
13 });
14
15 assert_equals(response.status, 303, 'Response.status should match');
16 assert_equals(response.statusText, 'See Other', 'Response.statusText should match');
17 assert_true(response.headers instanceof HeaderMap, 'Response.headers should be HeaderMap');
18 assert_equals(response.headers.size, 3, 'Response.headers.size should match' );
19 // Note: detailed behavioral tests for HeaderMap are in another test,
20 // http/tests/serviceworker/headermap.html.
21
22 }, 'Response in ServiceWorkerGlobalScope');
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/headermap-worker.js ('k') | LayoutTests/http/tests/serviceworker/response.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698