Lines Matching refs:Promise
56 var whitelist = {Promise: true, TypeError: true} property
97 assertThrows(function() { Promise(function() {}) }, TypeError)
101 assertTrue(new Promise(function() {}) instanceof Promise)
105 assertThrows(function() { new Promise(5) }, TypeError)
109 assertDoesNotThrow(function() { new Promise(function() { throw 5 }) })
113 (new Promise(function() { throw 5 })).chain(
121 Promise.accept(5);
122 Promise.accept(5).chain(undefined, assertUnreachable).chain(
130 Promise.reject(5).chain(assertUnreachable, undefined).chain(
138 Promise.accept(5).then(undefined, assertUnreachable).chain(
143 Promise.accept(6).then(null, assertUnreachable).chain(
151 Promise.reject(5).then(assertUnreachable, undefined).chain(
156 Promise.reject(6).then(assertUnreachable, null).chain(
164 var p1 = Promise.accept(5)
165 var p2 = Promise.accept(p1)
166 var p3 = Promise.accept(p2)
175 var p1 = Promise.accept(5)
176 var p2 = Promise.accept(p1)
177 var p3 = Promise.accept(p2)
186 var p1 = Promise.reject(5)
187 var p2 = Promise.accept(p1)
188 var p3 = Promise.accept(p2)
197 var p1 = Promise.reject(5)
198 var p2 = Promise.accept(p1)
199 var p3 = Promise.accept(p2)
208 var p1 = Promise.accept(5)
209 var p2 = Promise.accept(p1)
210 var p3 = Promise.accept(p2)
219 var p1 = Promise.accept(5)
220 var p2 = Promise.accept(p1)
221 var p3 = Promise.accept(p2)
230 var p1 = Promise.accept(5)
231 var p2 = Promise.accept(p1)
232 var p3 = Promise.accept(p2)
241 var p1 = Promise.accept(5)
242 var p2 = Promise.accept(p1)
243 var p3 = Promise.accept(p2)
252 var p1 = Promise.accept(5)
253 var p2 = Promise.accept(p1)
254 var p3 = Promise.accept(p2)
263 var p1 = Promise.accept(5)
264 var p2 = Promise.accept(p1)
265 var p3 = Promise.accept(p2)
274 var p1 = Promise.accept(5)
275 var p2 = Promise.accept(p1)
276 var p3 = Promise.accept(p2)
277 p3.then(function(x){ return Promise.accept(x+1) }, assertUnreachable).chain(
285 var p1 = Promise.accept(5)
286 var p2 = Promise.accept(p1)
287 var p3 = Promise.accept(p2)
288 p3.then(function(x) { return Promise.accept(x+1) }, assertUnreachable).then(
296 var p1 = Promise.accept(5)
297 var p2 = Promise.accept(p1)
298 var p3 = Promise.accept(p2)
307 var p1 = Promise.accept(5)
308 var p2 = Promise.accept(p1)
309 var p3 = Promise.accept(p2)
318 var p1 = Promise.accept(5)
319 var p2 = Promise.accept(p1)
320 var p3 = Promise.accept(p2)
329 var p1 = Promise.accept(5)
330 var p2 = Promise.accept(p1)
331 var p3 = Promise.accept(p2)
340 var p1 = Promise.accept(5)
342 var p3 = Promise.accept(p2)
351 var p1 = Promise.accept(5)
353 var p3 = Promise.accept(p2)
362 var p1 = Promise.reject(5)
364 var p3 = Promise.accept(p2)
373 var p1 = Promise.reject(5)
375 var p3 = Promise.accept(p2)
384 var deferred = Promise.defer()
386 var p2 = Promise.accept(p1)
387 var p3 = Promise.accept(p2)
397 var deferred = Promise.defer()
399 var p2 = Promise.accept(p1)
400 var p3 = Promise.accept(p2)
410 var deferred = Promise.defer()
412 var p2 = Promise.accept(p1)
413 var p3 = Promise.accept(p2)
423 var deferred = Promise.defer()
425 var p2 = Promise.accept(p1)
426 var p3 = Promise.accept(p2)
436 var deferred = Promise.defer()
448 var deferred = Promise.defer()
460 var deferred = Promise.defer()
463 var p3 = Promise.accept(p2)
473 var deferred = Promise.defer()
476 var p3 = Promise.accept(p2)
486 var deferred = Promise.defer()
489 var p3 = Promise.accept(p2)
499 var deferred = Promise.defer()
502 var p3 = Promise.accept(p2)
512 var p1 = Promise.accept(5)
513 var p2 = Promise.accept(p1)
514 var deferred = Promise.defer()
525 var p1 = Promise.accept(5)
526 var p2 = Promise.accept(p1)
527 var deferred = Promise.defer()
538 var p1 = Promise.accept(5)
539 var p2 = Promise.accept(p1)
540 var deferred = Promise.defer()
551 var p1 = Promise.accept(5)
552 var p2 = Promise.accept(p1)
553 var deferred = Promise.defer()
564 var p1 = Promise.accept(5)
566 var deferred = Promise.defer()
577 var p1 = Promise.accept(5)
579 var deferred = Promise.defer()
590 var p1 = Promise.accept(0)
600 var p1 = Promise.accept(0)
610 var deferred = Promise.defer()
621 var deferred = Promise.defer()
632 Promise.all({}).chain(
640 Promise.all([]).chain(
648 var deferred1 = Promise.defer()
650 var deferred2 = Promise.defer()
652 var deferred3 = Promise.defer()
654 Promise.all([p1, p2, p3]).chain(
673 var deferred = Promise.defer()
675 var p2 = Promise.accept(2)
676 var p3 = Promise.defer().promise
677 Promise.all([p1, p2, p3]).chain(
685 var deferred1 = Promise.defer()
687 var deferred2 = Promise.defer()
689 var deferred3 = Promise.defer()
691 Promise.all([p1, p2, p3]).chain(
702 Promise.race([]).chain(
709 var p1 = Promise.accept(1)
710 var p2 = Promise.accept(2)
711 var p3 = Promise.accept(3)
712 Promise.race([p1, p2, p3]).chain(
720 var p1 = Promise.accept(1)
721 var p2 = Promise.accept(2)
722 var p3 = Promise.accept(3)
723 Promise.race([0, p1, p2, p3]).chain(
731 Promise.race({}).chain(
739 var deferred1 = Promise.defer()
741 var deferred2 = Promise.defer()
743 var deferred3 = Promise.defer()
745 Promise.race([p1, p2, p3]).chain(
755 var deferred = Promise.defer()
757 var p2 = Promise.accept(2)
758 var p3 = Promise.defer().promise
759 Promise.race([p1, p2, p3]).chain(
768 var deferred1 = Promise.defer()
770 var deferred2 = Promise.defer()
772 var deferred3 = Promise.defer()
774 Promise.race([p1, p2, p3]).chain(
784 var deferred1 = Promise.defer()
786 var deferred2 = Promise.defer()
788 var deferred3 = Promise.defer()
790 Promise.race([p1, p2, p3]).chain(
803 var promise = new Promise(function(resolve, reject) {
813 MyPromise.__proto__ = Promise
819 MyPromise.prototype.__proto__ = Promise.prototype
829 assertTrue(d3.promise instanceof Promise, "subclass/instance")
836 assertTrue(p4 instanceof Promise, "subclass/instance4")
838 assertTrue(p5 instanceof Promise, "subclass/instance5")
846 return new Promise(function(resolve) { resolve(x) })
852 Promise.all([11, Promise.accept(12), 13, MyPromise.accept(14), 15, 16])
856 MyPromise.all([21, Promise.accept(22), 23, MyPromise.accept(24), 25, 26])