OLD | NEW |
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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 assertEquals('undefined', response.lookup(frame.arguments[1].value.ref).ty
pe); | 188 assertEquals('undefined', response.lookup(frame.arguments[1].value.ref).ty
pe); |
189 | 189 |
190 json = '{"seq":0,"type":"request","command":"frame","arguments":{"number":
1}}' | 190 json = '{"seq":0,"type":"request","command":"frame","arguments":{"number":
1}}' |
191 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); | 191 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); |
192 frame = response.body(); | 192 frame = response.body(); |
193 assertEquals(1, frame.index); | 193 assertEquals(1, frame.index); |
194 assertEquals("", response.lookup(frame.func.ref).name); | 194 assertEquals("", response.lookup(frame.func.ref).name); |
195 assertEquals("m", response.lookup(frame.func.ref).inferredName); | 195 assertEquals("m", response.lookup(frame.func.ref).inferredName); |
196 assertFalse(frame.constructCall); | 196 assertFalse(frame.constructCall); |
197 assertEquals(35, frame.line); | 197 assertEquals(35, frame.line); |
198 assertEquals(6, frame.column); | 198 assertEquals(2, frame.column); |
199 assertEquals(0, frame.arguments.length); | 199 assertEquals(0, frame.arguments.length); |
200 | 200 |
201 json = '{"seq":0,"type":"request","command":"frame","arguments":{"number":
3}}' | 201 json = '{"seq":0,"type":"request","command":"frame","arguments":{"number":
3}}' |
202 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); | 202 response = new ParsedResponse(dcp.processDebugJSONRequest(json)); |
203 frame = response.body(); | 203 frame = response.body(); |
204 assertEquals(3, frame.index); | 204 assertEquals(3, frame.index); |
205 assertEquals("", response.lookup(frame.func.ref).name); | 205 assertEquals("", response.lookup(frame.func.ref).name); |
206 | 206 |
207 // Source slices for the individual frames (they all refer to this script)
. | 207 // Source slices for the individual frames (they all refer to this script)
. |
208 json = '{"seq":0,"type":"request","command":"source",' + | 208 json = '{"seq":0,"type":"request","command":"source",' + |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // Add the debug event listener. | 262 // Add the debug event listener. |
263 Debug.setListener(listener); | 263 Debug.setListener(listener); |
264 | 264 |
265 // Set a break point and call to invoke the debug event listener. | 265 // Set a break point and call to invoke the debug event listener. |
266 Debug.setBreakPoint(f, 0, 0); | 266 Debug.setBreakPoint(f, 0, 0); |
267 g(); | 267 g(); |
268 | 268 |
269 // Make sure that the debug event listener vas invoked. | 269 // Make sure that the debug event listener vas invoked. |
270 assertFalse(exception, "exception in listener"); | 270 assertFalse(exception, "exception in listener"); |
271 assertTrue(listenerCalled); | 271 assertTrue(listenerCalled); |
OLD | NEW |