Index: LayoutTests/crypto/worker-promise-crash.html |
diff --git a/LayoutTests/crypto/worker-promise-crash.html b/LayoutTests/crypto/worker-promise-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..75d2b2301e50b49f590ff5bf3de7e75b84130389 |
--- /dev/null |
+++ b/LayoutTests/crypto/worker-promise-crash.html |
@@ -0,0 +1,33 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../resources/js-test.js"></script> |
+</head> |
+<body> |
+<p id="description"></p> |
+<div id="console"></div> |
+ |
+<script> |
+ description("Tests starting up some workers, having them start Promises, and then exit"); |
+ |
+ jsTestIsAsync = true; |
+ |
+ var allPromises = []; |
+ |
+ var kNumWorkers = 5; |
+ |
+ for (var i = 0; i < kNumWorkers; ++i) { |
+ allPromises.push(new Promise(function(resolve, reject) { |
+ var worker = new Worker("worker-infinite-resolve-loop.js"); |
+ worker.onmessage = function(event) |
+ { |
+ debug(event.data); |
+ resolve(); |
+ }; |
+ })); |
+ } |
+ |
+ Promise.all(allPromises).then(finishJSTest); |
+</script> |
+</body> |
+</html> |