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

Unified Diff: test/debugger/wrapper/break-on-debugger-stmt.js

Issue 2447073007: [debugger] Various break-related functionality in test wrapper (Closed)
Patch Set: Move DebugEvent to DebugWrapper to preserve old API Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/debugger/testcfg.py ('k') | test/debugger/wrapper/enable-disable.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/wrapper/break-on-debugger-stmt.js
diff --git a/test/debugger/wrapper/break-on-debugger-stmt.js b/test/debugger/wrapper/break-on-debugger-stmt.js
new file mode 100644
index 0000000000000000000000000000000000000000..2d5e6a930ff038e7bf96deb55ea39867c901a0eb
--- /dev/null
+++ b/test/debugger/wrapper/break-on-debugger-stmt.js
@@ -0,0 +1,20 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+function f() { debugger; debugger; }
+
+const Debug = new DebugWrapper();
+Debug.enable();
+
+let breakEventCount = 0;
+Debug.setListener(function(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ breakEventCount++;
+});
+
+assertEquals(0, breakEventCount);
+f();
+f();
+f();
+assertEquals(6, breakEventCount);
« no previous file with comments | « test/debugger/testcfg.py ('k') | test/debugger/wrapper/enable-disable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698