Index: LayoutTests/fast/js/Promise-static-all.html |
diff --git a/LayoutTests/fast/js/Promise-static-all.html b/LayoutTests/fast/js/Promise-static-all.html |
deleted file mode 100644 |
index 95325832874ad6ed7469d6f50d6bda5db77f06ed..0000000000000000000000000000000000000000 |
--- a/LayoutTests/fast/js/Promise-static-all.html |
+++ /dev/null |
@@ -1,104 +0,0 @@ |
-<!DOCTYPE html> |
-<html> |
-<head> |
-<script src="../../resources/js-test.js"></script> |
-</head> |
-<body> |
-<div id="description"></div> |
-<div id="console"></div> |
-<script> |
-description('Test Promise.all'); |
- |
-window.jsTestIsAsync = true; |
-result = undefined; |
- |
-var p1 = new Promise(function(resolve) { resolve('p1'); }); |
-var p2 = new Promise(function(resolve) { resolve('p2'); }); |
-var p3 = new Promise(function(resolve) { resolve('p3'); }); |
-var p4 = new Promise(function() {}); |
-var p5 = new Promise(function() {}); |
-var p6 = new Promise(function(_, reject) { reject('p6'); }); |
-var p7 = new Promise(function(_, reject) { reject('p7'); }); |
-var p8 = new Promise(function(_, reject) { reject('p8'); }); |
-var p9 = new Promise(function(resolve) { resolve(p2); }); |
- |
-Promise.all([p1, p2, p5]).then(function(result) { |
- testFailed('Promise.all([p1, p2, p5]) is fulfilled.'); |
-}, function() { |
- testFailed('Promise.all([p1, p2, p5]) is rejected.'); |
-}); |
- |
-Promise.all().then(function(result) { |
- testPassed('Promise.all() is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '0'); |
-}, function() { |
- testFailed('Promise.all() is rejected.'); |
-}).then(function() { |
- return Promise.all([p1, p2, p3]).then(function(result) { |
- testPassed('Promise.all([p1, p2, p3]) is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '3'); |
- shouldBeEqualToString('result[0]', 'p1'); |
- shouldBeEqualToString('result[1]', 'p2'); |
- shouldBeEqualToString('result[2]', 'p3'); |
- }, function() { |
- testFailed('Promise.all([p1, p2, p3]) is rejected.'); |
- }); |
-}).then(function() { |
- return Promise.all([p1, p6, p5]).then(function(result) { |
- testFailed('Promise.all([p1, p6, p5]) is fulfilled.'); |
- }, function(result) { |
- testPassed('Promise.all([p1, p6, p5]) is rejected.'); |
- window.result = result; |
- shouldBeEqualToString('result', 'p6'); |
- }); |
-}).then(function() { |
- return Promise.all([p9]).then(function(result) { |
- testPassed('Promise.all([p9]) is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '1'); |
- shouldBeEqualToString('result[0]', 'p2'); |
- }, function(result) { |
- testFailed('Promise.all([p9]) is rejected.'); |
- }); |
-}).then(function() { |
- // Array hole should not be skipped. |
- return Promise.all([p9,,,]).then(function(result) { |
- testPassed('Promise.all([p9,,,]) is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '3'); |
- shouldBeEqualToString('result[0]', 'p2'); |
- shouldBe('result[1]', 'undefined'); |
- shouldBe('result[2]', 'undefined'); |
- }, function(result) { |
- testFailed('Promise.all([p9,,,]) is rejected.'); |
- }); |
-}).then(function() { |
- // Immediate value should be converted to a promise object by the |
- // ToPromise operation. |
- return Promise.all([p9,42]).then(function(result) { |
- testPassed('Promise.all([p9,42]) is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '2'); |
- shouldBeEqualToString('result[0]', 'p2'); |
- shouldBe('result[1]', '42'); |
- }, function(result) { |
- testFailed('Promise.all([p9,42]) is rejected.'); |
- }); |
-}).then(function() { |
- // Not iterable object case. |
- return Promise.all({}).then(function(result) { |
- testPassed('Promise.all({}) is fulfilled.'); |
- window.result = result; |
- shouldBe('result.length', '0'); |
- }, function(result) { |
- testFailed('Promise.all({}) is rejected.'); |
- }); |
-}).then(finishJSTest, finishJSTest); |
- |
-shouldBe('result', 'undefined'); |
- |
-</script> |
-</body> |
-</html> |