Home
last modified time | relevance | path

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

12345678

/external/chromium_org/v8/test/mjsunit/es6/
Dpromises.js56 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(
[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) { }));
/external/chromium_org/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-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-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-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; });
/external/chromium_org/third_party/WebKit/Source/modules/serviceworkers/
DCache.idl14 …// [CallWith=ScriptState] Promise match((Request or ScalarValueString) request, optional QueryPara…
15 [CallWith=ScriptState] Promise match(Request request, optional QueryParams queryParams);
16 [CallWith=ScriptState] Promise match(ScalarValueString request, optional QueryParams queryParams);
18 …// [CallWith=ScriptState] Promise matchAll((Request or ScalarValueString) request, optional QueryP…
19 [CallWith=ScriptState] Promise matchAll(Request request, optional QueryParams queryParams);
20 …[CallWith=ScriptState] Promise matchAll(ScalarValueString request, optional QueryParams queryParam…
22 // [CallWith=ScriptState] Promise add((Request or ScalarValueString) request);
23 [CallWith=ScriptState] Promise add(Request request);
24 [CallWith=ScriptState] Promise add(ScalarValueString request);
28 // [CallWith=ScriptState] Promise addAll(sequence<Request or ScalarValueString> requests);
[all …]
DBody.idl14 [CallWith=ScriptState] Promise arrayBuffer();
15 [CallWith=ScriptState] Promise blob();
16 [CallWith=ScriptState] Promise json();
17 [CallWith=ScriptState] Promise text();
20 // [CallWith=ScriptState] Promise formData();
DCacheStorage.idl11 [CallWith=ScriptState] Promise get(ScalarValueString cacheName);
12 [CallWith=ScriptState] Promise has(ScalarValueString cacheName);
13 [CallWith=ScriptState, ImplementedAs=createFunction] Promise create(ScalarValueString cacheName);
14 [CallWith=ScriptState, ImplementedAs=deleteFunction] Promise delete(ScalarValueString cacheName);
15 [CallWith=ScriptState] Promise keys();
/external/chromium_org/ui/file_manager/video_player/js/cast/
Dmedia_manager.js48 return Promise.resolve(this.cachedToken_);
50 return new Promise(function(fulfill, reject) {
55 return Promise.reject(
59 return Promise.reject('Token fetch failed.');
65 return Promise.reject('Token fetch failed.');
77 return Promise.resolve(this.cachedUrl_);
79 return new Promise(function(fulfill, reject) {
84 return Promise.reject(
88 return Promise.reject('URL fetch failed.');
105 return Promise.resolve(this.cachedDriveProp_.contentMimeType || '');
[all …]
/external/chromium_org/third_party/WebKit/Source/modules/crypto/
DSubtleCrypto.idl43 [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
44 … [CallWith=ScriptState] Promise encrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
46 [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
47 … [CallWith=ScriptState] Promise decrypt(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
49 [CallWith=ScriptState] Promise sign(Dictionary algorithm, CryptoKey key, ArrayBuffer data);
50 [CallWith=ScriptState] Promise sign(Dictionary algorithm, CryptoKey key, ArrayBufferView data);
52 …// FIXME: should be: Promise verify(Dictionary algorithm, CryptoKey key, CryptoOperationData signa…
53 …[CallWith=ScriptState, Custom, ImplementedAs=verifySignature] Promise verify(Dictionary algorithm,…
55 [CallWith=ScriptState] Promise digest(Dictionary algorithm, ArrayBuffer data);
56 [CallWith=ScriptState] Promise digest(Dictionary algorithm, ArrayBufferView data);
[all …]
/external/chromium_org/third_party/WebKit/Source/bindings/core/v8/
DScriptPromise.cpp57 : m_resolver(scriptState, v8::Promise::Resolver::New(scriptState->isolate())) { } in InternalResolver()
59 v8::Local<v8::Promise> ScriptPromise::InternalResolver::v8Promise() const in v8Promise()
62 return v8::Local<v8::Promise>(); in v8Promise()
63 return m_resolver.v8Value().As<v8::Promise::Resolver>()->GetPromise(); in v8Promise()
77 m_resolver.v8Value().As<v8::Promise::Resolver>()->Resolve(value); in resolve()
85 m_resolver.v8Value().As<v8::Promise::Resolver>()->Reject(value); in reject()
114 v8::Local<v8::Promise> resultPromise = promise.As<v8::Promise>(); in then()
168 v8::Local<v8::Promise> ScriptPromise::rejectRaw(v8::Isolate* isolate, v8::Handle<v8::Value> value) in rejectRaw()
171 return v8::Local<v8::Promise>(); in rejectRaw()
172 v8::Local<v8::Promise::Resolver> resolver = v8::Promise::Resolver::New(isolate); in rejectRaw()
[all …]
/external/chromium_org/remoting/webapp/browser_test/
Dbrowser_test.js127 return base.Promise.sleep(0);
130 return new Promise (function(fulfill, reject) {
168 return Promise.resolve();
191 return base.Promise.sleep(CONNECT_PIN_WAIT).then(function() {
210 return Promise.reject(
222 return Promise.reject('Unexpected failure. actual:' + actual +
227 return Promise.race([onConnected, onFailure]);
241 return Promise.reject('Unexpected error - ' + errorMsg);
243 return Promise.race([onConnected, onFailure]);
248 return new Promise(function(fullfil, reject) {
[all …]
Dscrollbar_browser_test.js154 return Promise.reject(new Error(
157 return Promise.reject(new Error(
160 return Promise.reject(new Error(
163 return Promise.reject(new Error(
166 return Promise.resolve();
181 return base.Promise.sleep(500);
Dbump_scroll_browser_test.js118 return new Promise(function(fulfill, reject) {
123 base.Promise.sleep(1000).then(fulfill);
125 base.Promise.sleep(5000).then(function(){
179 var result = base.Promise.negate(
190 var result = base.Promise.negate(
241 return Promise.reject(
246 return Promise.resolve();
260 return Promise.resolve();
262 return Promise.reject(
/external/chromium_org/ui/file_manager/gallery/js/
Dbackground.js32 var stringDataPromise = new Promise(function(fulfill) {
41 return new Promise(function(fulfill) {
46 return Promise.all([stringDataPromise, volumeManagerPromise]).then(
64 return new Promise(function(fulfill, reject) {
83 return new Promise(reader.readEntries.bind(reader)).then(function(entries) {
127 return Promise.reject('The window has already opened.');
132 appWindowPromise = new Promise(function(fulfill) {
158 var parentPromise = new Promise(entries[0].getParent.bind(entries[0]));
168 return Promise.all([
173 return Promise.all([
/external/chromium_org/remoting/webapp/js_proto/
Ddom_proto.js192 var Promise = function (init) {}; class
199 Promise.prototype.then = function (onFulfill, onReject) {};
205 Promise.prototype['catch'] = function (onReject) {};
211 Promise.prototype.race = function (promises) {}
217 Promise.prototype.all = function (promises) {};
223 Promise.reject = function (reason) {};
229 Promise.resolve = function (value) {};
/external/chromium_org/chrome/browser/resources/cryptotoken/
Dappid.js96 return Promise.resolve(false);
100 return Promise.resolve(true);
105 return Promise.all(appIdChecks).then(function(results) {
124 return Promise.resolve(true);
166 return Promise.resolve([]);
171 return Promise.resolve([]);
176 return Promise.resolve([]);
/external/chromium_org/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/chromium_org/third_party/WebKit/Source/core/imagebitmap/
DWindowImageBitmapFactories.idl36 [CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLImageElement image);
37 …[CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLImageElement image, long sx,…
38 [CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLVideoElement video);
39 …[CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLVideoElement video, long sx,…
40 …[CallWith=ScriptState, RaisesException] Promise createImageBitmap(CanvasRenderingContext2D context…
41 …[CallWith=ScriptState, RaisesException] Promise createImageBitmap(CanvasRenderingContext2D context…
42 [CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLCanvasElement canvas);
43 …[CallWith=ScriptState, RaisesException] Promise createImageBitmap(HTMLCanvasElement canvas, long s…
/external/chromium_org/third_party/WebKit/Source/modules/credentialmanager/
DCredentialsContainer.idl9 [CallWith=ScriptState] Promise request(optional Dictionary options);
10 [CallWith=ScriptState] Promise notifySignedIn(Credential credential);
11 [CallWith=ScriptState] Promise notifyFailedSignIn(Credential credential);
12 [CallWith=ScriptState] Promise notifySignedOut();
/external/chromium_org/remoting/webapp/background/
Dapp_launcher.js57 return new Promise(function(resolve, reject) {
75 return new Promise(function(resolve, reject) {
107 return new Promise(function(resolve, reject) {
128 return Promise.reject(new Error(chrome.runtime.lastError.message));
131 return Promise.resolve();
/external/chromium_org/third_party/WebKit/Source/modules/encryptedmedia/
DMediaKeySession.idl38 [CallWith=ScriptState] readonly attribute Promise closed;
41 [CallWith=ScriptState] Promise generateRequest(DOMString initDataType, ArrayBuffer initData);
42 … [CallWith=ScriptState] Promise generateRequest(DOMString initDataType, ArrayBufferView initData);
45 [CallWith=ScriptState] Promise update(ArrayBuffer response);
46 [CallWith=ScriptState] Promise update(ArrayBufferView response);
47 [CallWith=ScriptState] Promise release();

12345678