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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/foreign-fetch-basics.html

Issue 2347473005: Make required dictionary members non-nullable again (Closed)
Patch Set: rm TouchInit, add tests Created 4 years, 2 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 <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/get-host-info.js"></script> 4 <script src="../resources/get-host-info.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.js"></script>
6 <script src="resources/foreign-fetch-helpers.js"></script> 6 <script src="resources/foreign-fetch-helpers.js"></script>
7 <body> 7 <body>
8 <script> 8 <script>
9 var host_info = get_host_info(); 9 var host_info = get_host_info();
10 10
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 promise_test(t => { 232 promise_test(t => {
233 var scope = 'fetch-access-control.php?basic&ACAOrigin=*&ACAMethods=SPECIAL'; 233 var scope = 'fetch-access-control.php?basic&ACAOrigin=*&ACAMethods=SPECIAL';
234 var remote_url = 234 var remote_url =
235 host_info.HTTPS_REMOTE_ORIGIN + '/serviceworker/resources/' + scope; 235 host_info.HTTPS_REMOTE_ORIGIN + '/serviceworker/resources/' + scope;
236 return install_cross_origin_worker(t, worker_for_scopes(['']), scope) 236 return install_cross_origin_worker(t, worker_for_scopes(['']), scope)
237 .then(() => fetch(remote_url, {method: 'SPECIAL'})) 237 .then(() => fetch(remote_url, {method: 'SPECIAL'}))
238 .then(response => response.text()) 238 .then(response => response.text())
239 .then(response_text => assert_true(response_text.startsWith('report('))); 239 .then(response_text => assert_true(response_text.startsWith('report(')));
240 }, 'Service Worker does not intercept fetches with CORS preflight'); 240 }, 'Service Worker does not intercept fetches with CORS preflight');
241 241
242 promise_test(t => {
243 var scope = 'simple.txt?null';
244 var remote_url =
245 host_info.HTTPS_REMOTE_ORIGIN + '/serviceworker/resources/' + scope;
246 return install_cross_origin_worker(t, worker_for_scopes(['']), scope)
247 .then(() => promise_rejects(t, new TypeError(), fetch(remote_url)));
248 }, 'Foreign fetch rejects if resolved with a null response.');
242 </script> 249 </script>
243 </body> 250 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698