Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 var initialize_DebuggerTest = function() { | 1 var initialize_DebuggerTest = function() { |
| 2 | 2 |
| 3 InspectorTest.startDebuggerTest = function(callback, quiet) | 3 InspectorTest.startDebuggerTest = function(callback, quiet) |
| 4 { | 4 { |
| 5 if (quiet !== undefined) | 5 if (quiet !== undefined) |
| 6 InspectorTest._quiet = quiet; | 6 InspectorTest._quiet = quiet; |
| 7 WebInspector.showPanel("scripts"); | 7 WebInspector.showPanel("scripts"); |
| 8 | 8 |
| 9 if (WebInspector.debuggerModel.debuggerEnabled()) | 9 if (WebInspector.debuggerModel.debuggerEnabled()) |
| 10 startTest(); | 10 startTest(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 { | 75 { |
| 76 InspectorTest.evaluateInConsole("setTimeout(testFunction, 0)"); | 76 InspectorTest.evaluateInConsole("setTimeout(testFunction, 0)"); |
| 77 InspectorTest.addResult("Set timer for test function."); | 77 InspectorTest.addResult("Set timer for test function."); |
| 78 InspectorTest.waitUntilPaused(callback); | 78 InspectorTest.waitUntilPaused(callback); |
| 79 }; | 79 }; |
| 80 | 80 |
| 81 InspectorTest.waitUntilPaused = function(callback) | 81 InspectorTest.waitUntilPaused = function(callback) |
| 82 { | 82 { |
| 83 callback = InspectorTest.safeWrap(callback); | 83 callback = InspectorTest.safeWrap(callback); |
| 84 | 84 |
| 85 if (InspectorTest._callFrames) | 85 if (InspectorTest._pausedScriptData) |
| 86 callback(InspectorTest._callFrames); | 86 callback.apply(callback, InspectorTest._pausedScriptData); |
|
yurys
2013/06/05 08:07:36
Please pass arguments explicitly (it is easier to
SeRya
2013/06/05 11:34:57
Done.
| |
| 87 else | 87 else |
| 88 InspectorTest._waitUntilPausedCallback = callback; | 88 InspectorTest._waitUntilPausedCallback = callback; |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 InspectorTest.waitUntilResumed = function(callback) | 91 InspectorTest.waitUntilResumed = function(callback) |
| 92 { | 92 { |
| 93 callback = InspectorTest.safeWrap(callback); | 93 callback = InspectorTest.safeWrap(callback); |
| 94 | 94 |
| 95 if (!InspectorTest._callFrames) | 95 if (!InspectorTest._pausedScriptData) |
| 96 callback(); | 96 callback(); |
| 97 else | 97 else |
| 98 InspectorTest._waitUntilResumedCallback = callback; | 98 InspectorTest._waitUntilResumedCallback = callback; |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 InspectorTest.resumeExecution = function(callback) | 101 InspectorTest.resumeExecution = function(callback) |
| 102 { | 102 { |
| 103 if (WebInspector.panels.scripts.paused) | 103 if (WebInspector.panels.scripts.paused) |
| 104 WebInspector.panels.scripts._togglePause(); | 104 WebInspector.panels.scripts._togglePause(); |
| 105 InspectorTest.waitUntilResumed(callback); | 105 InspectorTest.waitUntilResumed(callback); |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 127 | 127 |
| 128 InspectorTest.dumpSourceFrameContents = function(sourceFrame) | 128 InspectorTest.dumpSourceFrameContents = function(sourceFrame) |
| 129 { | 129 { |
| 130 InspectorTest.addResult("==Source frame contents start=="); | 130 InspectorTest.addResult("==Source frame contents start=="); |
| 131 var textEditor = sourceFrame._textEditor; | 131 var textEditor = sourceFrame._textEditor; |
| 132 for (var i = 0; i < textEditor.linesCount; ++i) | 132 for (var i = 0; i < textEditor.linesCount; ++i) |
| 133 InspectorTest.addResult(textEditor.line(i)); | 133 InspectorTest.addResult(textEditor.line(i)); |
| 134 InspectorTest.addResult("==Source frame contents end=="); | 134 InspectorTest.addResult("==Source frame contents end=="); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 InspectorTest._pausedScript = function(callFrames, reason, auxData) | 137 InspectorTest._pausedScript = function(callFrames, reason, auxData, breakpointId s) |
| 138 { | 138 { |
| 139 if (!InspectorTest._quiet) | 139 if (!InspectorTest._quiet) |
| 140 InspectorTest.addResult("Script execution paused."); | 140 InspectorTest.addResult("Script execution paused."); |
| 141 InspectorTest._callFrames = callFrames; | 141 InspectorTest._pausedScriptData = Array.prototype.slice.call(arguments); |
| 142 if (InspectorTest._waitUntilPausedCallback) { | 142 if (InspectorTest._waitUntilPausedCallback) { |
| 143 var callback = InspectorTest._waitUntilPausedCallback; | 143 var callback = InspectorTest._waitUntilPausedCallback; |
| 144 delete InspectorTest._waitUntilPausedCallback; | 144 delete InspectorTest._waitUntilPausedCallback; |
| 145 callback(InspectorTest._callFrames); | 145 callback.apply(callback, InspectorTest._pausedScriptData); |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 InspectorTest._resumedScript = function() | 149 InspectorTest._resumedScript = function() |
| 150 { | 150 { |
| 151 if (!InspectorTest._quiet) | 151 if (!InspectorTest._quiet) |
| 152 InspectorTest.addResult("Script execution resumed."); | 152 InspectorTest.addResult("Script execution resumed."); |
| 153 delete InspectorTest._callFrames; | 153 delete InspectorTest._pausedScriptData; |
| 154 if (InspectorTest._waitUntilResumedCallback) { | 154 if (InspectorTest._waitUntilResumedCallback) { |
| 155 var callback = InspectorTest._waitUntilResumedCallback; | 155 var callback = InspectorTest._waitUntilResumedCallback; |
| 156 delete InspectorTest._waitUntilResumedCallback; | 156 delete InspectorTest._waitUntilResumedCallback; |
| 157 callback(); | 157 callback(); |
| 158 } | 158 } |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 InspectorTest.showUISourceCode = function(uiSourceCode, callback) | 161 InspectorTest.showUISourceCode = function(uiSourceCode, callback) |
| 162 { | 162 { |
| 163 var panel = WebInspector.showPanel("scripts"); | 163 var panel = WebInspector.showPanel("scripts"); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 | 303 |
| 304 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber, location) | 304 InspectorTest.checkUILocation = function(uiSourceCode, lineNumber, columnNumber, location) |
| 305 { | 305 { |
| 306 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "' ," + | 306 InspectorTest.assertEquals(uiSourceCode, location.uiSourceCode, "Incorrect u iSourceCode, expected '" + (uiSourceCode ? uiSourceCode.originURL() : null) + "' ," + |
| 307 " but got '" + (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); | 307 " but got '" + (location.uiSourceCode ? location.uiSourceCode.originURL() : null) + "'"); |
| 308 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); | 308 InspectorTest.assertEquals(lineNumber, location.lineNumber, "Incorrect lineN umber, expected '" + lineNumber + "', but got '" + location.lineNumber + "'"); |
| 309 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber + "'"); | 309 InspectorTest.assertEquals(columnNumber, location.columnNumber, "Incorrect c olumnNumber, expected '" + columnNumber + "', but got '" + location.columnNumber + "'"); |
| 310 }; | 310 }; |
| 311 | 311 |
| 312 }; | 312 }; |
| OLD | NEW |