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

Side by Side Diff: LayoutTests/http/tests/serviceworker/fetch-event.html

Issue 588993002: [ServiceWorker] Remove the test for the rejected result of FetchEvent from fetch-event.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/fetch-event-test-worker.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/test-helpers.js"></script> 4 <script src="resources/test-helpers.js"></script>
5 <body> 5 <body>
6 <script> 6 <script>
7 // Temporary measure to diagnose timeouts on Win XP. Let the W3C harness 7 // Temporary measure to diagnose timeouts on Win XP. Let the W3C harness
8 // timeout before run-webkit-tests does, so it can report the particular 8 // timeout before run-webkit-tests does, so it can report the particular
9 // test that timed out. 9 // test that timed out.
10 // FIXME: Remove after the cause of timeout is fixed. 10 // FIXME: Remove after the cause of timeout is fixed.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 assert_equals(frame.contentDocument.body.textContent, 92 assert_equals(frame.contentDocument.body.textContent,
93 '', 93 '',
94 'Response should be the empty string'); 94 'Response should be the empty string');
95 unload_iframe(frame); 95 unload_iframe(frame);
96 return service_worker_unregister_and_done(t, scope); 96 return service_worker_unregister_and_done(t, scope);
97 }) 97 })
98 .catch(unreached_rejection(t)); 98 .catch(unreached_rejection(t));
99 }, 'Service Worker responds to fetch event with null response body', propertie s); 99 }, 'Service Worker responds to fetch event with null response body', propertie s);
100 100
101 async_test(function(t) { 101 async_test(function(t) {
102 var scope = 'resources/simple.html?reject';
103 service_worker_unregister_and_register(t, worker, scope)
104 .then(function(reg) { return wait_for_activated(t, reg); })
105 .then(function() { return with_iframe(scope); })
106 .then(function(frame) {
107 assert_equals(frame.contentDocument.body.textContent,
108 '',
109 'Response should be a NetworkError');
110 unload_iframe(frame);
111 return service_worker_unregister_and_done(t, scope);
112 })
113 .catch(unreached_rejection(t));
114 }, 'Service Worker rejects fetch event', properties);
115
116 async_test(function(t) {
117 var scope = 'resources/simple.html?fetch'; 102 var scope = 'resources/simple.html?fetch';
118 service_worker_unregister_and_register(t, worker, scope) 103 service_worker_unregister_and_register(t, worker, scope)
119 .then(function(reg) { return wait_for_activated(t, reg); }) 104 .then(function(reg) { return wait_for_activated(t, reg); })
120 .then(function() { return with_iframe(scope); }) 105 .then(function() { return with_iframe(scope); })
121 .then(function(frame) { 106 .then(function(frame) {
122 assert_equals(frame.contentDocument.body.textContent, 107 assert_equals(frame.contentDocument.body.textContent,
123 'Here\'s an other html file.\n', 108 'Here\'s an other html file.\n',
124 'Response should come from fetched other file'); 109 'Response should come from fetched other file');
125 unload_iframe(frame); 110 unload_iframe(frame);
126 return service_worker_unregister_and_done(t, scope); 111 return service_worker_unregister_and_done(t, scope);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 '(0)(1)[InvalidStateError](2)[InvalidStateError](0)', 173 '(0)(1)[InvalidStateError](2)[InvalidStateError](0)',
189 'Multiple calls of respondWith must throw InvalidStateErrors.'); 174 'Multiple calls of respondWith must throw InvalidStateErrors.');
190 unload_iframe(frame); 175 unload_iframe(frame);
191 return service_worker_unregister_and_done(t, scope); 176 return service_worker_unregister_and_done(t, scope);
192 }) 177 })
193 .catch(unreached_rejection(t)); 178 .catch(unreached_rejection(t));
194 }, 'Multiple calls of respondWith must throw InvalidStateErrors', properties); 179 }, 'Multiple calls of respondWith must throw InvalidStateErrors', properties);
195 180
196 </script> 181 </script>
197 </body> 182 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/fetch-event-test-worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698