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

Side by Side Diff: LayoutTests/fast/dom/promise-rejection-events-lifetime.html

Issue 1215813003: Correctly track lifetime of promise rejection events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScopedPersistent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6 'use strict';
7 async_test(function(t) {
8 var e;
9 var p = Promise.reject(new Error());
10
11 window.onunhandledrejection = function(evt) {
12 e = evt;
13 setTimeout(function() {
14 var unreached = t.unreached_func('promise should not be fulfilled');
15 p.then(unreached, function(reason) {});
16 p = undefined;
17 }, 10);
18 evt.preventDefault();
19 };
20
21 window.onrejectionhandled = function(evt) {
22 setTimeout(function() {
23 if (window.gc) {
24 gc();
25 }
26 t.step(function() {
27 assert_not_equals(e.reason, null);
28 assert_not_equals(e.promise, null);
29 });
30 t.done();
31 }, 10);
32 };
33 }, 'evt.promise and evt.reason should live at least as long as evt');
34 </script>
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScopedPersistent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698