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

Unified Diff: test/mjsunit/es6/default-parameters-debug.js

Issue 2469043003: [debugger] fix blacklisted tests. (Closed)
Patch Set: fix 2318 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/debug-step-into-constructor.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/default-parameters-debug.js
diff --git a/test/mjsunit/es6/default-parameters-debug.js b/test/mjsunit/es6/default-parameters-debug.js
index 30e19c42afbd44117f0c177ba2423efe47d77934..49adfa4610e90e262ee9e48ff5ce1322488b3239 100644
--- a/test/mjsunit/es6/default-parameters-debug.js
+++ b/test/mjsunit/es6/default-parameters-debug.js
@@ -9,36 +9,31 @@ Debug = debug.Debug
listenerComplete = false;
breakPointCount = 0;
+exception = null;
function listener(event, exec_state, event_data, data) {
- if (event == Debug.DebugEvent.Break) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
breakPointCount++;
if (breakPointCount == 1) {
// Break point in initializer for parameter `a`, invoked by
// initializer for parameter `b`
- assertEquals('default', exec_state.frame(1).evaluate('mode').value());
-
- // initializer for `b` can't refer to `b`
- assertThrows(function() {
- exec_state.frame(1).evaluate('b').value();
- }, ReferenceError);
-
- assertThrows(function() {
- exec_state.frame(1).evaluate('c');
- }, ReferenceError);
+ assertEquals('default', exec_state.frame(0).evaluate('mode').value());
+ assertTrue(exec_state.frame(1).evaluate('b').isUndefined());
+ assertTrue(exec_state.frame(1).evaluate('c').isUndefined());
} else if (breakPointCount == 2) {
// Break point in IIFE initializer for parameter `c`
assertEquals('modeFn', exec_state.frame(1).evaluate('a.name').value());
assertEquals('default', exec_state.frame(1).evaluate('b').value());
- assertThrows(function() {
- exec_state.frame(1).evaluate('c');
- }, ReferenceError);
+ assertTrue(exec_state.frame(1).evaluate('c').isUndefined());
} else if (breakPointCount == 3) {
// Break point in function body --- `c` parameter is shadowed
assertEquals('modeFn', exec_state.frame(0).evaluate('a.name').value());
assertEquals('default', exec_state.frame(0).evaluate('b').value());
assertEquals('local', exec_state.frame(0).evaluate('d').value());
}
+ } catch (e) {
+ exception = e;
}
};
@@ -56,3 +51,4 @@ f();
// Make sure that the debug event listener vas invoked.
assertEquals(3, breakPointCount);
+assertNull(exception);
« no previous file with comments | « test/mjsunit/es6/debug-step-into-constructor.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698