| OLD | NEW | 
|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 InspectorTest.addScript( | 5 InspectorTest.addScript( | 
| 6 `function blackboxedBoo() | 6 `function blackboxedBoo() | 
| 7 { | 7 { | 
| 8     var a = 42; | 8     var a = 42; | 
| 9     var b = foo(); | 9     var b = foo(); | 
| 10     return a + b; | 10     return a + b; | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 96   }).then(runAction); | 96   }).then(runAction); | 
| 97 } | 97 } | 
| 98 | 98 | 
| 99 var actions = [ "stepOut", "print", "stepOut", "print", "stepOut", "print", | 99 var actions = [ "stepOut", "print", "stepOut", "print", "stepOut", "print", | 
| 100     "stepInto", "print", "stepOver", "stepInto", "print", "stepOver", "stepInto"
     , "print", | 100     "stepInto", "print", "stepOver", "stepInto", "print", "stepOver", "stepInto"
     , "print", | 
| 101     "stepOver", "stepInto", "print" ]; | 101     "stepOver", "stepInto", "print" ]; | 
| 102 | 102 | 
| 103 function runAction(response) | 103 function runAction(response) | 
| 104 { | 104 { | 
| 105   var action = actions.shift(); | 105   var action = actions.shift(); | 
| 106   if (!action) | 106   if (!action) { | 
| 107     InspectorTest.completeTest(); | 107     InspectorTest.completeTest(); | 
|  | 108     return; | 
|  | 109   } | 
| 108 | 110 | 
| 109   if (action === "print") { | 111   if (action === "print") { | 
| 110     printCallFrames(response.params.callFrames); | 112     printCallFrames(response.params.callFrames); | 
| 111     runAction({}); | 113     runAction({}); | 
| 112   } else { | 114   } else { | 
| 113     InspectorTest.log("action: " + action); | 115     InspectorTest.log("action: " + action); | 
| 114     Protocol.Debugger[action](); | 116     Protocol.Debugger[action](); | 
| 115   } | 117   } | 
| 116 } | 118 } | 
| 117 | 119 | 
| 118 function printCallFrames(callFrames) | 120 function printCallFrames(callFrames) | 
| 119 { | 121 { | 
| 120   var topCallFrame = callFrames[0]; | 122   var topCallFrame = callFrames[0]; | 
| 121   if (topCallFrame.functionName.startsWith("blackboxed")) | 123   if (topCallFrame.functionName.startsWith("blackboxed")) | 
| 122     InspectorTest.log("FAIL: blackboxed function in top call frame"); | 124     InspectorTest.log("FAIL: blackboxed function in top call frame"); | 
| 123   for (var callFrame of callFrames) | 125   for (var callFrame of callFrames) | 
| 124     InspectorTest.log(callFrame.functionName + ": " + callFrame.location.lineNum
     ber + ":" + callFrame.location.columnNumber); | 126     InspectorTest.log(callFrame.functionName + ": " + callFrame.location.lineNum
     ber + ":" + callFrame.location.columnNumber); | 
| 125   InspectorTest.log(""); | 127   InspectorTest.log(""); | 
| 126 } | 128 } | 
| OLD | NEW | 
|---|