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

Side by Side Diff: test/mjsunit/es6/debug-stepin-string-template.js

Issue 1502163002: [debugger] add test case for stepping into string template. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « test/mjsunit/debug-stepin-builtin-callback-opt.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
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --expose-debug-as debug
6
7 Debug = debug.Debug
8
9 var exception = null;
10 var break_count = 0;
Jakob Kummerow 2015/12/07 09:20:14 nit: unused variable
11 var log = [];
12
13 function listener(event, exec_state, event_data, data) {
14 if (event != Debug.DebugEvent.Break) return;
15 try {
16 print(event_data.sourceLineText());
17 var entry = "";
18 for (var i = 0; i < exec_state.frameCount(); i++) {
19 entry += exec_state.frame(i).sourceLineText().substr(-1);
20 entry += exec_state.frame(i).sourceColumn();
21 }
22 log.push(entry);
23 exec_state.prepareStep(Debug.StepAction.StepIn, 1);
24 } catch (e) {
25 exception = e;
26 }
27 };
28
29 function u(x) {
30 return x.toUpperCase(); // d
31 } // e
32
33 var n = 3;
34
35 var o = {
36 toString: function() {
37 return "D"; // f
38 } // g
39 }
40
41
42
43 Debug.setListener(listener);
44 debugger; // a
45 var s = `1 ${u("a")} 2 ${u("b")} 3 ${n} 4 ${o}`; // b
46 Debug.setListener(null); // c
47
48 assertNull(exception);
49
50 assertEquals([
51 "a0",
52 "b0",
53 "d2b13",
54 "e0b13",
55 "b25",
56 "d2b25",
57 "e0b25",
58 "f4b44",
59 "g2b44",
60 "c0"
61 ], log);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-stepin-builtin-callback-opt.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698