Index: LayoutTests/http/tests/fetch/script-tests/simple.js |
diff --git a/LayoutTests/http/tests/fetch/script-tests/simple.js b/LayoutTests/http/tests/fetch/script-tests/simple.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2e23822dc310ca86713746d79b62087985aca7e0 |
--- /dev/null |
+++ b/LayoutTests/http/tests/fetch/script-tests/simple.js |
@@ -0,0 +1,16 @@ |
+var global = this; |
+if (global.importScripts) { |
+ importScripts('/resources/testharness.js'); |
+} |
+ |
+promise_test(function(test) { |
+ return Promise.resolve().then(function() { |
+ return fetch(new Request('/fetch/resources/hello.txt')); |
+ }).then(function(res) { |
hiroshige
2014/12/19 07:41:20
Indent +2 spaces.
yhirano
2014/12/19 09:29:08
Done.
|
+ return res.text(); |
+ }).then(function(text) { |
hiroshige
2014/12/19 07:41:20
Indent +2 spaces.
yhirano
2014/12/19 09:29:08
Done.
|
+ 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.
|
+ }); |
hiroshige
2014/12/19 07:41:20
Indent +2 spaces.
yhirano
2014/12/19 09:29:08
Done.
|
+}); |
hiroshige
2014/12/19 07:41:20
Indent +2 spaces.
yhirano
2014/12/19 09:29:08
Done.
|
+ |
+done(); |