| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 + " }\n" | 55 + " }\n" |
| 56 + "}\n" | 56 + "}\n" |
| 57 ); | 57 ); |
| 58 | 58 |
| 59 | 59 |
| 60 assertEquals(25, F25()); | 60 assertEquals(25, F25()); |
| 61 assertEquals(26, F26()); | 61 assertEquals(26, F26()); |
| 62 | 62 |
| 63 var script = Debug.findScript(F25); | 63 var script = Debug.findScript(F25); |
| 64 | 64 |
| 65 assertEquals(0, Debug.scriptBreakPoints().length); |
| 66 |
| 65 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 1, 1,
"true || false || false"); | 67 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 1, 1,
"true || false || false"); |
| 66 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 6, 1,
"true || false || false"); | 68 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 6, 1,
"true || false || false"); |
| 67 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 14, 1,
"true || false || false"); | 69 Debug.setScriptBreakPoint(Debug.ScriptBreakPointType.ScriptId, script.id, 14, 1,
"true || false || false"); |
| 68 | 70 |
| 69 assertEquals(3, Debug.scriptBreakPoints().length); | 71 assertEquals(3, Debug.scriptBreakPoints().length); |
| 70 | 72 |
| 71 var new_source = script.source.replace(function_z_text, ""); | 73 var new_source = script.source.replace(function_z_text, ""); |
| 72 print("new source: " + new_source); | 74 print("new source: " + new_source); |
| 73 | 75 |
| 74 var change_log = new Array(); | 76 var change_log = new Array(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 89 breakpoints_in_script++; | 91 breakpoints_in_script++; |
| 90 } | 92 } |
| 91 } | 93 } |
| 92 | 94 |
| 93 assertEquals(3, breakpoints_in_script); | 95 assertEquals(3, breakpoints_in_script); |
| 94 | 96 |
| 95 // Check 2 breakpoints. The one in deleted function should have been moved somew
here. | 97 // Check 2 breakpoints. The one in deleted function should have been moved somew
here. |
| 96 assertTrue(break_position_map[1]); | 98 assertTrue(break_position_map[1]); |
| 97 assertTrue(break_position_map[11]); | 99 assertTrue(break_position_map[11]); |
| 98 | 100 |
| 101 // Delete all breakpoints to make this test reentrant. |
| 102 var breaks = Debug.scriptBreakPoints(); |
| 103 var breaks_ids = []; |
| 104 |
| 105 for (var i = 0; i < breaks.length; i++) { |
| 106 breaks_ids.push(breaks[i].number()); |
| 107 } |
| 108 |
| 109 for (var i = 0; i < breaks_ids.length; i++) { |
| 110 Debug.clearBreakPoint(breaks_ids[i]); |
| 111 } |
| 112 |
| 113 assertEquals(0, Debug.scriptBreakPoints().length); |
| OLD | NEW |