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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 testArguments(dcp, '{"type":"scriptId","target":' + f_script_id + ',"line":'
+ f_line + '}', true, false); | 110 testArguments(dcp, '{"type":"scriptId","target":' + f_script_id + ',"line":'
+ f_line + '}', true, false); |
111 testArguments(dcp, '{"type":"scriptId","target":' + g_script_id + ',"line":'
+ g_line + '}', true, false); | 111 testArguments(dcp, '{"type":"scriptId","target":' + g_script_id + ',"line":'
+ g_line + '}', true, false); |
112 testArguments(dcp, '{"type":"scriptId","target":' + h_script_id + ',"line":'
+ h_line + '}', true, false); | 112 testArguments(dcp, '{"type":"scriptId","target":' + h_script_id + ',"line":'
+ h_line + '}', true, false); |
113 | 113 |
114 mirror = debug.MakeMirror(f); | 114 mirror = debug.MakeMirror(f); |
115 testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', tru
e, false); | 115 testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', tru
e, false); |
116 mirror = debug.MakeMirror(o.a); | 116 mirror = debug.MakeMirror(o.a); |
117 testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', tru
e, false); | 117 testArguments(dcp, '{"type":"handle","target":' + mirror.handle() + '}', tru
e, false); |
118 | 118 |
119 testArguments(dcp, '{"type":"script","target":"sourceUrlScript","line":1}',
true, true); | 119 testArguments(dcp, '{"type":"script","target":"sourceUrlScript","line":0}',
true, true); |
120 | 120 |
121 // Indicate that all was processed. | 121 // Indicate that all was processed. |
122 listenerComplete = true; | 122 listenerComplete = true; |
123 } | 123 } |
124 } catch (e) { | 124 } catch (e) { |
125 exception = e | 125 exception = e |
126 }; | 126 }; |
127 }; | 127 }; |
128 | 128 |
129 // Add the debug event listener. | 129 // Add the debug event listener. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 Debug.setListener(breakListener); | 183 Debug.setListener(breakListener); |
184 | 184 |
185 sourceUrlFunc(); | 185 sourceUrlFunc(); |
186 | 186 |
187 assertTrue(breakListenerCalled, "Break listener not called on breakpoint set by
sourceURL"); | 187 assertTrue(breakListenerCalled, "Break listener not called on breakpoint set by
sourceURL"); |
188 | 188 |
189 // Set a break point on a line with the comment, and check that actual position | 189 // Set a break point on a line with the comment, and check that actual position |
190 // is the next line after the comment. | 190 // is the next line after the comment. |
191 var number = Debug.setScriptBreakPointById(g_script_id, g_line + 1); | 191 var number = Debug.setScriptBreakPointById(g_script_id, g_line + 1); |
192 assertEquals(g_line + 2, Debug.findBreakPoint(number).actual_location.line); | 192 assertEquals(g_line + 2, Debug.findBreakPoint(number).actual_location.line); |
OLD | NEW |