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

Side by Side Diff: test/mjsunit/es6/debug-promises/throw-with-undefined-reject.js

Issue 455683002: Fix debug-promises tests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | « test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug --allow-natives-syntax 5 // Flags: --expose-debug-as debug --allow-natives-syntax
6 6
7 // Test debug events when an exception is thrown inside a Promise, which is 7 // Test debug events when an exception is thrown inside a Promise, which is
8 // caught by a custom promise, which has no reject handler. 8 // caught by a custom promise, which has no reject handler.
9 // We expect two Exception debug events: 9 // We expect two Exception debug events:
10 // 1) when the exception is thrown in the promise q. 10 // 1) when the exception is thrown in the promise q.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 exec_state.frame(0).sourceLineText().indexOf('// event') > 0); 46 exec_state.frame(0).sourceLineText().indexOf('// event') > 0);
47 assertEquals("caught", event_data.exception().message); 47 assertEquals("caught", event_data.exception().message);
48 } else if (expected_events == 0) { 48 } else if (expected_events == 0) {
49 // All of the frames on the stack are from native Javascript. 49 // All of the frames on the stack are from native Javascript.
50 assertEquals(0, exec_state.frameCount()); 50 assertEquals(0, exec_state.frameCount());
51 assertEquals("undefined is not a function", 51 assertEquals("undefined is not a function",
52 event_data.exception().message); 52 event_data.exception().message);
53 } else { 53 } else {
54 assertUnreachable(); 54 assertUnreachable();
55 } 55 }
56 assertEquals(q, event_data.promise()); 56 assertSame(q, event_data.promise());
57 } 57 }
58 } catch (e) { 58 } catch (e) {
59 %AbortJS(e + "\n" + e.stack); 59 %AbortJS(e + "\n" + e.stack);
60 } 60 }
61 } 61 }
62 62
63 Debug.setBreakOnUncaughtException(); 63 Debug.setBreakOnUncaughtException();
64 Debug.setListener(listener); 64 Debug.setListener(listener);
65 65
66 log.push("end main"); 66 log.push("end main");
(...skipping 12 matching lines...) Expand all
79 } 79 }
80 } 80 }
81 81
82 // Run testDone through the Object.observe processing loop. 82 // Run testDone through the Object.observe processing loop.
83 var dummy = {}; 83 var dummy = {};
84 Object.observe(dummy, checkResult); 84 Object.observe(dummy, checkResult);
85 dummy.dummy = dummy; 85 dummy.dummy = dummy;
86 } 86 }
87 87
88 testDone(0); 88 testDone(0);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/debug-promises/throw-with-throw-in-reject.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698