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

Side by Side Diff: test/debugger/debug/debug-evaluate-modify-this.js

Issue 2466273005: [debugger] Further stepping support in test wrapper (Closed)
Patch Set: Move more tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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
6 5
7 Debug = debug.Debug 6 Debug = debug.Debug
8 7
9 var exception = null; 8 var exception = null;
10 9
11 var f = () => { debugger; } 10 var f = () => { debugger; }
12 var g = function() { debugger; } 11 var g = function() { debugger; }
13 var h = (function() { return () => { debugger; }; }).call({}); 12 var h = (function() { return () => { debugger; }; }).call({});
14 13
15 function listener(event, exec_state, event_data, data) { 14 function listener(event, exec_state, event_data, data) {
16 if (event != Debug.DebugEvent.Break) return; 15 if (event != Debug.DebugEvent.Break) return;
17 try { 16 try {
18 assertThrows(() => exec_state.frame(0).evaluate("this = 2")); 17 assertThrows(() => exec_state.frame(0).evaluate("this = 2"));
19 } catch (e) { 18 } catch (e) {
20 exception = e; 19 exception = e;
21 print("Caught something. " + e + " " + e.stack); 20 print("Caught something. " + e + " " + e.stack);
22 }; 21 };
23 }; 22 };
24 23
25 Debug.setListener(listener); 24 Debug.setListener(listener);
26 25
27 f(); 26 f();
28 g(); 27 g();
29 g.call({}); 28 g.call({});
30 h(); 29 h();
31 30
32 Debug.setListener(null); 31 Debug.setListener(null);
33 assertNull(exception); 32 assertNull(exception);
OLDNEW
« no previous file with comments | « test/debugger/debug/debug-compile-optimized.js ('k') | test/debugger/debug/debug-evaluate-shadowed-context-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698