Changeset 85317 in webkit
- Timestamp:
- Apr 29, 2011 5:21:39 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r85316 r85317 1 2011-04-29 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r85315. 4 http://trac.webkit.org/changeset/85315 5 https://bugs.webkit.org/show_bug.cgi?id=59792 6 7 Broke script-formatter.html test (Requested by podivilov on 8 #webkit). 9 10 * http/tests/inspector/inspector-test.js: 11 (initialize_InspectorTest.InspectorTest.reloadPage): 12 (initialize_InspectorTest.InspectorTest.pageReloaded): 13 (initialize_InspectorTest.InspectorTest.runWhenPageLoads): 14 (): 15 * inspector/debugger/script-formatter-expected.txt: 16 * inspector/debugger/script-formatter.html: 17 1 18 2011-04-29 Vsevolod Vlasov <vsevik@chromium.org> 2 19 -
trunk/LayoutTests/http/tests/inspector/inspector-test.js
r85315 r85317 151 151 } 152 152 153 InspectorTest.navigate = function(url, callback)154 {155 InspectorTest._pageLoadedCallback = InspectorTest.safeWrap(callback);156 157 if (WebInspector.panels.network)158 WebInspector.panels.network._reset();159 InspectorTest.evaluateInConsole("window.location = '" + url + "'");160 }161 162 153 InspectorTest.reloadPage = function(callback) 163 154 { 164 InspectorTest._ pageLoadedCallback = InspectorTest.safeWrap(callback);155 InspectorTest._reloadPageCallback = InspectorTest.safeWrap(callback); 165 156 166 157 if (WebInspector.panels.network) … … 169 160 } 170 161 171 InspectorTest.page Loaded = function()162 InspectorTest.pageReloaded = function() 172 163 { 173 164 resultsSynchronized = false; 174 165 InspectorTest.addResult("Page reloaded."); 175 if (InspectorTest._ pageLoadedCallback) {176 var callback = InspectorTest._ pageLoadedCallback;177 delete InspectorTest._ pageLoadedCallback;166 if (InspectorTest._reloadPageCallback) { 167 var callback = InspectorTest._reloadPageCallback; 168 delete InspectorTest._reloadPageCallback; 178 169 callback(); 179 170 } … … 182 173 InspectorTest.runWhenPageLoads = function(callback) 183 174 { 184 var oldCallback = InspectorTest._ pageLoadedCallback;175 var oldCallback = InspectorTest._reloadPageCallback; 185 176 function chainedCallback() 186 177 { … … 189 180 callback(); 190 181 } 191 InspectorTest._ pageLoadedCallback = InspectorTest.safeWrap(chainedCallback);182 InspectorTest._reloadPageCallback = InspectorTest.safeWrap(chainedCallback); 192 183 } 193 184 … … 351 342 { 352 343 if (window.InspectorTest) { 353 InspectorTest.page Loaded();344 InspectorTest.pageReloaded(); 354 345 return; 355 346 } -
trunk/LayoutTests/inspector/debugger/script-formatter-expected.txt
r85315 r85317 15 15 } 16 16 </script></body></html> 17 18 Running: testBreakpointsInOriginalAndFormattedSource19 Script execution paused.20 Call stack:21 0) f1 (script-formatter.html:12)22 1) (script-formatter.html:1)23 Script execution resumed.24 Page reloaded.25 Navigated to test-navigation.html26 Page reloaded.27 Navigated back to test page.28 Script execution paused.29 Call stack:30 0) f2 (script-formatter.html:17)31 1) (script-formatter.html:1)32 Script execution resumed.33 17 Debugger was disabled. 34 18 -
trunk/LayoutTests/inspector/debugger/script-formatter.html
r85315 r85317 7 7 <script> 8 8 9 function f1()10 {11 var a=0;var b=1;var c=3;var d=4;var e=5;12 var f=0;13 return 0;14 }15 16 function f2()17 {18 var x = 0;19 return 0;20 }21 22 9 var test = function() 23 10 { 24 var panel = WebInspector.panels.scripts;25 11 var worker = new Worker("ScriptFormatterWorker.js"); 26 12 … … 99 85 var content = "<html><body><script>function f(){}<" + "/script><script>function g(){}<" + "/script></body></html>"; 100 86 worker.postMessage({ mimeType: "text/html", content: content }); 101 },102 103 function testBreakpointsInOriginalAndFormattedSource(next)104 {105 var root;106 InspectorTest.showScriptSource("script-formatter.html", didShowScriptSource);107 108 function didShowScriptSource(sourceFrame)109 {110 root = sourceFrame._url.substr(0, sourceFrame._url.lastIndexOf("/") + 1);111 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);112 InspectorTest.waitUntilPaused(pausedInF1);113 InspectorTest.evaluateInPageWithTimeout("f1()");114 }115 116 function pausedInF1(callFrames)117 {118 InspectorTest.captureStackTrace(callFrames);119 InspectorTest.resumeExecution(resumed);120 }121 122 function resumed()123 {124 InspectorTest.navigate(root + "resources/test-navigation.html", didNavigateAnotherPage);125 }126 127 function didNavigateAnotherPage()128 {129 InspectorTest.addResult("Navigated to test-navigation.html");130 panel._toggleFormatSourceFiles();131 InspectorTest.showScriptSource("test-navigation.html", didShowAnotherPage);132 }133 134 function didShowAnotherPage(sourceFrame)135 {136 InspectorTest.navigate(root + "script-formatter.html", didNavigateBack);137 }138 139 function didNavigateBack()140 {141 InspectorTest.addResult("Navigated back to test page.");142 InspectorTest.showScriptSource("script-formatter.html", didShowFormattedScriptSource);143 }144 145 function didShowFormattedScriptSource(sourceFrame)146 {147 // There should be no breakpoint in f1 since script is pretty-printed now.148 InspectorTest.evaluateInPageWithTimeout("f1()");149 150 InspectorTest.setBreakpoint(panel.visibleView, 24, "", true);151 InspectorTest.waitUntilPaused(pausedInF2);152 InspectorTest.evaluateInPageWithTimeout("f2()");153 }154 155 function pausedInF2(callFrames)156 {157 InspectorTest.captureStackTrace(callFrames);158 next();159 }160 87 } 161 88 ]); -
trunk/Source/WebCore/ChangeLog
r85316 r85317 1 2011-04-29 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r85315. 4 http://trac.webkit.org/changeset/85315 5 https://bugs.webkit.org/show_bug.cgi?id=59792 6 7 Broke script-formatter.html test (Requested by podivilov on 8 #webkit). 9 10 * inspector/front-end/DebuggerPresentationModel.js: 11 (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): 12 (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger.didRemoveBreakpoint): 13 (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger): 14 (WebInspector.PresentationBreakpoint.prototype.serialize): 15 * inspector/front-end/ScriptsPanel.js: 16 (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare): 17 (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): 18 (WebInspector.ScriptsPanel.prototype.reset): 19 1 20 2011-04-29 Vsevolod Vlasov <vsevik@chromium.org> 2 21 -
trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
r85315 r85317 211 211 } 212 212 213 for (var id in this._breakpointsWithoutSourceFile) {214 var breakpoints = this._breakpointsWithoutSourceFile[id];215 for (var i = 0; i < breakpoints.length; ++i)216 this._removeBreakpointFromDebugger(breakpoints[i]);217 }218 219 213 var messages = this._messages; 220 214 this._reset(); … … 337 331 _removeBreakpointFromDebugger: function(breakpoint, callback) 338 332 { 339 if ("debuggerId" in breakpoint) { 340 WebInspector.debuggerModel.removeBreakpoint(breakpoint.debuggerId); 333 if (!("debuggerId" in breakpoint)) { 334 if (callback) 335 callback(); 336 return; 337 } 338 339 function didRemoveBreakpoint() 340 { 341 341 this._unbindDebuggerId(breakpoint); 342 }343 344 if (callback)345 callback();342 if (callback) 343 callback(); 344 } 345 WebInspector.debuggerModel.removeBreakpoint(breakpoint.debuggerId, didRemoveBreakpoint.bind(this)); 346 346 }, 347 347 … … 632 632 serializedBreakpoint.condition = this.condition; 633 633 serializedBreakpoint.enabled = this.enabled; 634 if ("debuggerId" in this) 635 serializedBreakpoint.debuggerId = this.debuggerId; 634 serializedBreakpoint.debuggerId = this.debuggerId; 636 635 return serializedBreakpoint; 637 636 } -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r85315 r85317 296 296 297 297 if (a.isContentScript && !b.isContentScript) 298 return 1; 298 return 1; 299 299 if (!a.isContentScript && b.isContentScript) 300 return -1; 300 return -1; 301 301 302 302 if (a.text === b.text) … … 480 480 this._updateBackAndForwardButtons(); 481 481 482 for (var id in this._sourceFileIdToSourceFrame) {483 var sourceFrame = this._sourceFileIdToSourceFrame[id];484 sourceFrame.removeEventListener(WebInspector.SourceFrame.Events.Loaded, this._sourceFrameLoaded, this);485 }486 487 482 this._sourceFileIdToSourceFrame = {}; 488 483 this._sourceFileIdToFilesSelectOption = {};
Note: See TracChangeset
for help on using the changeset viewer.