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

Side by Side Diff: LayoutTests/http/tests/fetch/script-tests/simple.js

Issue 806513004: Add a simple fetch API test. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
(Empty)
1 var global = this;
2 if (global.importScripts) {
3 importScripts('/resources/testharness.js');
4 }
5
6 promise_test(function(test) {
7 return Promise.resolve().then(function() {
8 return fetch(new Request('/fetch/resources/hello.txt'));
9 }).then(function(res) {
10 return res.text();
11 }).then(function(text) {
12 assert_equals(text, 'hello, world\n', 'response.body');
13 });
14 });
15
16 done();
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/fetch/resources/hello.txt ('k') | LayoutTests/http/tests/fetch/simple.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698