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

Side by Side Diff: LayoutTests/http/tests/serviceworker/request-end-to-end.html

Issue 329853012: [ServiceWorker] Make Request class better conformance with the spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: incorporated jochen's comment Created 6 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Request end-to-end</title> 2 <title>Service Worker: Request end-to-end</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script> 6 <script>
7 var t = async_test('Request: end-to-end'); 7 var t = async_test('Request: end-to-end');
8 t.step(function() { 8 t.step(function() {
9 var url = 'resources/request-end-to-end-worker.js'; 9 var url = 'resources/request-end-to-end-worker.js';
10 var scope = 'resources/blank.html'; 10 var scope = 'resources/blank.html';
(...skipping 22 matching lines...) Expand all
33 with_iframe(scope, t.step_func(function(frame) {})); 33 with_iframe(scope, t.step_func(function(frame) {}));
34 } 34 }
35 35
36 function onMessage(event) { 36 function onMessage(event) {
37 assert_equals( 37 assert_equals(
38 event.data.url, 38 event.data.url,
39 location.href.substring(0, location.href.lastIndexOf('/') + 1) + sco pe, 39 location.href.substring(0, location.href.lastIndexOf('/') + 1) + sco pe,
40 'request.url should be passed to onfetch event.'); 40 'request.url should be passed to onfetch event.');
41 assert_equals(event.data.method, 'GET', 41 assert_equals(event.data.method, 'GET',
42 'request.method should be passed to onfetch event.'); 42 'request.method should be passed to onfetch event.');
43 assert_equals(event.data.headers['User-Agent'], navigator.userAgent, 43 assert_equals(event.data.headers['user-agent'], navigator.userAgent,
44 'User-Agent header should be passed to onfetch event.') 44 'User-Agent header should be passed to onfetch event.')
45 service_worker_unregister_and_done(t, scope); 45 service_worker_unregister_and_done(t, scope);
46 } 46 }
47 }); 47 });
48 </script> 48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698