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

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) {
hiroshige 2014/12/19 07:41:20 Indent +2 spaces.
yhirano 2014/12/19 09:29:08 Done.
10 return res.text();
11 }).then(function(text) {
hiroshige 2014/12/19 07:41:20 Indent +2 spaces.
yhirano 2014/12/19 09:29:08 Done.
12 assert_equals(text, 'hello, world\n');
hiroshige 2014/12/19 07:41:20 Add an assert message such as "Response text shoul
yhirano 2014/12/19 09:29:08 Done.
13 });
hiroshige 2014/12/19 07:41:20 Indent +2 spaces.
yhirano 2014/12/19 09:29:08 Done.
14 });
hiroshige 2014/12/19 07:41:20 Indent +2 spaces.
yhirano 2014/12/19 09:29:08 Done.
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