OLD | NEW |
---|---|
(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(); | |
OLD | NEW |