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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/request-body-blob-iframe.html

Issue 2889153004: Upstream service worker "request" tests to WPT (Closed)
Patch Set: Add "use strict" directive Created 3 years, 7 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 <meta charset="utf-8"> 2 <meta charset="utf-8">
3 <title>request-body-blob-iframe</title> 3 <title>request-body-blob-iframe</title>
4 <body></body> 4 <body></body>
5 <script> 5 <script>
6 var blob = new Blob(['it\'s me the blob', 6 var blob = new Blob(['it\'s me the blob',
7 'and more blob!']); 7 'and more blob!']);
8 fetch('simple.html?post-with-blob-body', 8 fetch('simple.html?post-with-blob-body',
9 { method: 'POST', body: blob }) 9 { method: 'POST', body: blob })
10 .then(resp => { 10 .then(resp => {
11 if (!resp.ok) 11 if (!resp.ok)
12 return Promise.reject('bad response: ' + resp.status); 12 return Promise.reject('bad response: ' + resp.status);
13 return resp.text() 13 return resp.text()
14 }) 14 })
15 .then(text => parent.done(text)) 15 .then(text => parent.done(text))
16 .catch(error => { 16 .catch(error => {
17 var reason = error.message || error.name || error; 17 var reason = error.message || error.name || error;
18 parent.done('error: ' + reason); 18 parent.done('error: ' + reason);
19 }); 19 });
20 </script> 20 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698