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

Unified Diff: test.js

Issue 2746053006: NOT FOR COMMIT: test that interceptors work with the inspector.
Patch Set: Created 3 years, 9 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 | « src/d8.cc ('k') | test/debugger/test-api.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test.js
diff --git a/test.js b/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..53b1b3a468e6ed9de0a812a8f2eae47ad2bf34d9
--- /dev/null
+++ b/test.js
@@ -0,0 +1,26 @@
+// Copyright 2017 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.
+
+// Run this test with
+// d8 test/mjsunit/mjsunit.js test/debugger/test-api.js --allow-natives-syntax --enable-inspector test.js
+
+let exception = null;
+let named_object = new NamedObject();
+
+function listener(event, exec_state, event_data, data) {
+ if (event != Debug.DebugEvent.Break) return;
+ try {
+ print(JSON.stringify(exec_state.frame().evaluate("named_object").value()));
+ } catch (e) {
+ exception = e;
+ }
+}
+
+let Debug = debug.Debug;
+Debug.setListener(listener);
+
+debugger;
+
+Debug.setListener(null);
+assertNull(exception);
« no previous file with comments | « src/d8.cc ('k') | test/debugger/test-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698