Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: LayoutTests/fast/js/Promise-native-reject.html

Issue 197213007: ScriptPromise implementation for V8 Promises (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="description"></div>
8 <div id="console"></div>
9 <script>
10 description('Test Promise reject inside Blink.');
11
12 window.jsTestIsAsync = true;
13
14 var reject;
15 var promise = new Promise(function(res, rej) { reject = rej; });
16 var blinkPromise = internals.createRejectedPromise(42);
17
18 promise.then(function() {
19 testFailed('fulfilled');
20 }, function(value) {
21 return blinkPromise;
22 }).then(function() {
23 testFailed('fulfilled');
24 }, function(value) {
25 result = value;
26 shouldBe('result', '42');
27 }).then(finishJSTest, finishJSTest);
28
29 reject(118);
30
31 </script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698