Home
last modified time | relevance | path

Searched refs:Promise (Results 1 – 25 of 125) sorted by relevance

12345

/external/v8/test/mjsunit/es6/
Dpromises.js41 Object.prototype.toString.call(new Promise(function() {})));
68 Promise: true, property
128 assertThrows(function() { Promise(function() {}) }, TypeError)
132 assertTrue(new Promise(function() {}) instanceof Promise)
136 assertThrows(function() { new Promise(5) }, TypeError)
140 assertDoesNotThrow(function() { new Promise(function() { throw 5 }) })
144 (new Promise(function() { throw 5 })).chain(
152 Promise.accept(5);
153 Promise.accept(5).chain(undefined, assertUnreachable).chain(
161 Promise.reject(5).chain(assertUnreachable, undefined).chain(
[all …]
Dmirror-promises.js56 var resolved = new Promise(function(resolve, reject) { resolve() });
57 var rejected = new Promise(function(resolve, reject) { reject() });
58 var pending = new Promise(function(resolve, reject) {});
64 var resolvedv = new Promise(function(resolve, reject) { resolve('resolve') });
65 var rejectedv = new Promise(function(resolve, reject) { reject('reject') });
66 var thrownv = new Promise(function(resolve, reject) { throw 'throw' });
73 var m1 = debug.MakeMirror(new Promise(
82 var m2 = debug.MakeMirror(new Promise(function(resolve, reject) { reject(2) }));
87 var m3 = debug.MakeMirror(new Promise(function(resolve, reject) { }));
Dpromise-internal-setter.js15 class P extends Promise {}
17 P.all([Promise.resolve('ok')]);
18 P.race([Promise.resolve('ok')]);
/external/v8/test/webkit/fast/js/
DPromise-static-race.js30 var p1 = new Promise(function(resolve) { resolve('p1'); });
31 var p2 = new Promise(function(resolve) { resolve('p2'); });
32 var p3 = new Promise(function(resolve) { resolve('p3'); });
33 var p4 = new Promise(function() {});
34 var p5 = new Promise(function() {});
35 var p6 = new Promise(function(_, reject) { reject('p6'); });
36 var p7 = new Promise(function(_, reject) { reject('p7'); });
37 var p8 = new Promise(function(_, reject) { reject('p8'); });
38 var p9 = new Promise(function(resolve) { resolve(p2); });
40 Promise.race([p4, p5]).then(function(localResult) {
[all …]
DPromise-static-all.js30 var p1 = new Promise(function(resolve) { resolve('p1'); });
31 var p2 = new Promise(function(resolve) { resolve('p2'); });
32 var p3 = new Promise(function(resolve) { resolve('p3'); });
33 var p4 = new Promise(function() {});
34 var p5 = new Promise(function() {});
35 var p6 = new Promise(function(_, reject) { reject('p6'); });
36 var p7 = new Promise(function(_, reject) { reject('p7'); });
37 var p8 = new Promise(function(_, reject) { reject('p8'); });
38 var p9 = new Promise(function(resolve) { resolve(p2); });
40 Promise.all([p1, p2, p5]).then(function(result) {
[all …]
DPromise-static-all-expected.txt1 Test Promise.all
6 PASS Promise.all() is rejected.
7 PASS Promise.all([]) is fulfilled.
9 PASS Promise.all([p1, p2, p3]) is fulfilled.
14 PASS Promise.all([p1, p6, p5]) is rejected.
16 PASS Promise.all([p9]) is fulfilled.
19 PASS Promise.all([p9,,,]) is fulfilled.
24 PASS Promise.all([p9,42]) is fulfilled.
28 PASS Promise.all({}) is rejected.
DPromise-static-race-expected.txt1 Test Promise.race
6 PASS Promise.race() is rejected.
7 PASS Promise.race({}) is rejected.
8 PASS Promise.race([p4, p1, p6]) is fulfilled.
10 PASS Promise.race([p4, p6, p1]) is rejected.
12 PASS Promise.race([p9]) is fulfilled.
14 PASS Promise.race([p4,,]) is fulfilled.
16 PASS Promise.race([p4,42]) is fulfilled.
DPromise-init-expected.txt1 Test Promise construction.
5 PASS promise instanceof Promise is true
6 PASS promise.constructor is Promise
10 PASS new Promise() threw exception TypeError: Promise resolver undefined is not a function.
11 PASS new Promise(37) threw exception TypeError: Promise resolver 37 is not a function.
12 PASS promise = new Promise(function() { throw Error("foo"); }) did not throw exception.
DPromise-resolve-chain.js31 var promise1 = new Promise(function(r) { resolve1 = r; });
32 var promise2 = new Promise(function(r) { resolve2 = r; });
33 var promise3 = new Promise(function(r) { resolve3 = r; });
34 var promise4 = new Promise(function(_, r) { reject4 = r; });
35 var promise5 = new Promise(function(r) { resolve5 = r; });
36 var promise6 = new Promise(function(r) { resolve6 = r; });
DPromise-then-callback-receiver.js31 Promise.resolve().then(function () {
32 return Promise.resolve(42).then(function () {
40 return Promise.reject(42).then(function () {
DPromise-static-cast.js32 var value = new Promise(function (r) { resolve = r;} );
33 var promise = Promise.resolve(value);
42 return Promise.resolve(42).then(function (res) {
DPromise-init.js31 var promise = new Promise(function(newResolve, newReject) {
47 promise = new Promise(function() { throw Error('foo'); });
58 new Promise(function(resolve) {
DPromise-catch-expected.txt1 Test Promise.prototype.catch.
6 PASS firstPromise instanceof Promise is true
7 PASS secondPromise instanceof Promise is true
DPromise-then-expected.txt1 Test Promise.prototype.then
6 PASS firstPromise instanceof Promise is true
7 PASS secondPromise instanceof Promise is true
/external/v8/test/mjsunit/harmony/
Dpromise-species.js10 var test = new Promise(function(){});
14 assertTrue(Promise.resolve(test) instanceof Promise);
15 assertFalse(Promise.resolve(test) instanceof bogusConstructor);
17 Promise.resolve(test).catch(e => %AbortJS("Error " + e)).then(() => {
26 class MyPromise extends Promise {
42 assertTrue(myPromise instanceof Promise);
/external/v8/test/promises-aplus/
DREADME1 This directory contains code for running Promise/A+ Compliance Test Suite[1].
4 Promise/A+ Compliance Test Suite requires Node environment and needs some
9 - An adapter for harmony Promise used in Promise/A+ tests.
21 The emulation is not complete. Upgrading Promise/A+ tests will require
24 Sinon.JS[3], required by Promise/A+ tests, is also downloaded by run-tests.py.
/external/v8/test/cctest/
Dtest-extra.js28 const Promise = global.Promise;
29 const Promise_resolve = v8.simpleBind(Promise.resolve, Promise);
/external/v8/test/mjsunit/es6/debug-promises/
Dreject-caught-by-default-reject-handler.js19 var p0 = new Promise(function(res, rej) { resolve = res; reject = rej; });
22 return Promise.reject(new Error("123"));
28 var q = new Promise(function(res, rej) {
45 assertTrue(event_data.promise() instanceof Promise);
Dreject-uncaught-all.js16 var p = new Promise(function(resolve, reject) {
24 return Promise.reject(new Error("uncaught reject"));
33 assertTrue(event_data.promise() instanceof Promise);
Dreject-uncaught-uncaught.js16 var p = new Promise(function(resolve, reject) {
24 return Promise.reject(Error("uncaught reject")); // event
33 assertTrue(event_data.promise() instanceof Promise);
Dreject-with-undefined-reject.js16 var p = new Promise(function(resolve, reject) {
28 MyPromise.prototype = new Promise(function() {});
34 return Promise.reject(new Error("caught"));
Dreject-with-invalid-reject.js16 var p = new Promise(function(resolve, reject) {
28 MyPromise.prototype = new Promise(function() {});
34 return Promise.reject(new Error("caught"));
Dpromise-race-uncaught.js18 var p1 = Promise.resolve();
28 var p3 = Promise.race([p2]);
37 assertTrue(event_data.promise() instanceof Promise);
/external/chromium-trace/catapult/docs/
Dpromises-vs-tasks.md3 `Promise` is a well-defined [built-in object](https://developer.mozilla.org/en/docs/Web/JavaScript/…
11 …ference is that tasks cannot be used with asynchronous operations. In a `Promise`, you can chain a…
13 … that all operations in the task queue are synchronous. Compare this to `Promise` which doesn't ha…
15 …ore complex dependency graph between operations via `then()`, `Promise.all()` and `Promise.race()`.
30 … bust the time budget for a frame. Given its asynchronous nature `RunWhenIdle` returns a `Promise`.
36 …ant to chain are asynchronous then you don't have a choice and must use `Promise`. If you want to …
40 … to try to reproduce it on top of promises. Given these improvements to `Promise` it may be possib…
/external/v8/test/promises-aplus/lib/
Dadapter.js31 resolved: function(value) { return Promise.resolve(value); },
32 rejected: function(reason) { return Promise.reject(reason); },
35 var promise = new Promise(function(res, rej) {

12345