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

Side by Side Diff: test/debugger/debug/debug-backtrace.js

Issue 2566093002: [debug-wrapper] migrate some scope related tests (Closed)
Patch Set: address comments Created 4 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
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 22 matching lines...) Expand all
33 33
34 var m = (0, function() { 34 var m = (0, function() {
35 new f(1); 35 new f(1);
36 }); 36 });
37 37
38 function g() { 38 function g() {
39 m(); 39 m();
40 }; 40 };
41 41
42 42
43 // Get the Debug object exposed from the debug context global object.
44 Debug = debug.Debug 43 Debug = debug.Debug
45 44
46 listenerCalled = false; 45 listenerCalled = false;
47 exception = false; 46 exception = false;
48 47
49 function listener(event, exec_state, event_data, data) { 48 function listener(event, exec_state, event_data, data) {
50 try { 49 try {
51 if (event == Debug.DebugEvent.Break) { 50 if (event == Debug.DebugEvent.Break) {
52 // The expected backtrace is 51 // The expected backtrace is
53 // 0: f 52 // 0: f
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Add the debug event listener. 89 // Add the debug event listener.
91 Debug.setListener(listener); 90 Debug.setListener(listener);
92 91
93 // Set a break point and call to invoke the debug event listener. 92 // Set a break point and call to invoke the debug event listener.
94 Debug.setBreakPoint(f, 0, 0); 93 Debug.setBreakPoint(f, 0, 0);
95 g(); 94 g();
96 95
97 // Make sure that the debug event listener vas invoked. 96 // Make sure that the debug event listener vas invoked.
98 assertFalse(exception, "exception in listener"); 97 assertFalse(exception, "exception in listener");
99 assertTrue(listenerCalled); 98 assertTrue(listenerCalled);
OLDNEW
« no previous file with comments | « test/debugger/bugs/harmony/debug-blockscopes.js ('k') | test/debugger/debug/debug-clearbreakpoint.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698