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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-request-fallback.https.html

Issue 2704543002: Import wpt@3bd204d7e86fd81e98e63f4ce59b95d98bad1c54 (Closed)
Patch Set: Created 3 years, 10 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: the fallback behavior of FetchEvent</title> 2 <title>Service Worker: the fallback behavior of FetchEvent</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/get-host-info.sub.js"></script> 5 <script src="/common/get-host-info.sub.js"></script>
6 <script src="resources/test-helpers.sub.js?pipe=sub"></script> 6 <script src="resources/test-helpers.sub.js?pipe=sub"></script>
7 <script> 7 <script>
8 var expected_urls = []; 8 var expected_urls = [];
9 9
10 function xhr_fail_test(frame, url) { 10 function xhr_fail_test(frame, url) {
11 expected_urls.push(url); 11 expected_urls.push(url);
12 return new Promise(function(resolve, reject) { 12 return new Promise(function(resolve, reject) {
13 frame.contentWindow.xhr(url) 13 frame.contentWindow.xhr(url)
14 .then(function(){ 14 .then(function(){
15 reject(url + ' should fail.'); 15 reject(url + ' should fail.');
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 'to the ServiceWorker must be correct.'); 104 'to the ServiceWorker must be correct.');
105 assert_equals(requests[i + 1].mode, 'cors', 105 assert_equals(requests[i + 1].mode, 'cors',
106 'The mode of the request which was passed from XHR ' + 106 'The mode of the request which was passed from XHR ' +
107 'to the ServiceWorker must be cors.'); 107 'to the ServiceWorker must be cors.');
108 } 108 }
109 service_worker_unregister_and_done(t, SCOPE); 109 service_worker_unregister_and_done(t, SCOPE);
110 }) 110 })
111 .catch(unreached_rejection(t)); 111 .catch(unreached_rejection(t));
112 }, 'Verify the fallback behavior of FetchEvent'); 112 }, 'Verify the fallback behavior of FetchEvent');
113 </script> 113 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698