Changeset 79880 in webkit
- Timestamp:
- Feb 28, 2011 10:23:06 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r79879 r79880 1 2011-02-28 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: add live edit test. 6 https://bugs.webkit.org/show_bug.cgi?id=55360 7 8 * http/tests/inspector/debugger-test.js: 9 (initialize_DebuggerTest): 10 * inspector/debugger/debug-inlined-scripts.html: 11 * inspector/debugger/live-edit-expected.txt: Added. 12 * inspector/debugger/live-edit.html: Added. 13 * inspector/debugger/resources/edit-me.js: Added. 14 * platform/gtk/Skipped: 15 * platform/mac/Skipped: 16 * platform/qt/Skipped: 17 * platform/win/Skipped: 18 1 19 2011-02-28 Pavel Feldman <pfeldman@chromium.org> 2 20 -
trunk/LayoutTests/http/tests/inspector/debugger-test.js
r79555 r79880 125 125 InspectorTest.addResult(s); 126 126 } 127 }; 128 129 InspectorTest.dumpSourceFrameContents = function(sourceFrame) 130 { 131 InspectorTest.addResult("==Source frame contents start=="); 132 var textModel = sourceFrame._textModel; 133 for (var i = 0; i < textModel.linesCount; ++i) 134 InspectorTest.addResult(textModel.line(i)); 135 InspectorTest.addResult("==Source frame contents end=="); 127 136 }; 128 137 … … 162 171 callback(sourceFrame); 163 172 else 164 InspectorTest.addSniffer(sourceFrame._textModel, "setText", callback.bind(null, sourceFrame));173 sourceFrame.addEventListener(WebInspector.SourceFrame.Events.Loaded, callback.bind(null, sourceFrame)); 165 174 return; 166 175 } -
trunk/LayoutTests/inspector/debugger/debug-inlined-scripts.html
r78808 r79880 46 46 function step4(sourceFrame) 47 47 { 48 dumpSourceFrameContents(sourceFrame);48 InspectorTest.dumpSourceFrameContents(sourceFrame); 49 49 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5)); 50 50 } … … 63 63 function step6(sourceFrame) 64 64 { 65 dumpSourceFrameContents(sourceFrame);65 InspectorTest.dumpSourceFrameContents(sourceFrame); 66 66 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step7)); 67 67 } … … 70 70 { 71 71 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(null, step5)); 72 }73 74 function dumpSourceFrameContents(sourceFrame)75 {76 InspectorTest.addResult("==Source frame contents start==");77 var textModel = sourceFrame._textModel;78 for (var i = 0; i < textModel.linesCount; ++i)79 InspectorTest.addResult(textModel.line(i));80 InspectorTest.addResult("==Source frame contents end==");81 72 } 82 73 } -
trunk/LayoutTests/platform/gtk/Skipped
r79857 r79880 1185 1185 http/tests/inspector/network/network-size.html 1186 1186 1187 # https://bugs.webkit.org/show_bug.cgi?id=40300 1188 inspector/debugger/live-edit.html 1189 1187 1190 # [GTK] r65681 broke a couple GTK+ a11y tests 1188 1191 # https://bugs.webkit.org/show_bug.cgi?id=44316 -
trunk/LayoutTests/platform/mac/Skipped
r79527 r79880 236 236 inspector/debugger/dom-breakpoints.html 237 237 238 # https://bugs.webkit.org/show_bug.cgi?id=40300 239 inspector/debugger/live-edit.html 240 238 241 # Safari doesn't allow to customize outermost scrollbars. 239 242 # https://bugs.webkit.org/show_bug.cgi?id=43960 -
trunk/LayoutTests/platform/qt/Skipped
r79879 r79880 102 102 # https://bugs.webkit.org/show_bug.cgi?id=43332 103 103 inspector/debugger/dom-breakpoints.html 104 105 # https://bugs.webkit.org/show_bug.cgi?id=40300 106 inspector/debugger/live-edit.html 104 107 105 108 # This port doesn't support v8 i18n extension. -
trunk/LayoutTests/platform/win/Skipped
r79865 r79880 1092 1092 inspector/debugger/dom-breakpoints.html 1093 1093 1094 # https://bugs.webkit.org/show_bug.cgi?id=40300 1095 inspector/debugger/live-edit.html 1096 1094 1097 # <https://bugs.webkit.org/show_bug.cgi?id=44484> 1095 1098 svg/batik/paints/patternRegions-positioned-objects.svg -
trunk/Source/WebCore/ChangeLog
r79878 r79880 1 2011-02-28 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: add live edit test. 6 https://bugs.webkit.org/show_bug.cgi?id=55360 7 8 Test: inspector/debugger/live-edit.html 9 10 * inspector/front-end/SourceFrame.js: 11 (WebInspector.SourceFrame.prototype._doubleClick): 12 (WebInspector.SourceFrame.prototype._didEditLine): 13 1 14 2011-02-28 Pavel Feldman <pfeldman@chromium.org> 2 15 -
trunk/Source/WebCore/inspector/front-end/SourceFrame.js
r79555 r79880 812 812 return; // Do not trigger editing from line numbers. 813 813 814 var lineNumber = lineRow.lineNumber; 814 this._textViewer.editLine(lineRow, this._didEditLine.bind(this, lineRow.lineNumber)); 815 }, 816 817 _didEditLine: function(lineNumber, newContent) 818 { 819 var lines = []; 820 var oldLines = this._content.text.split('\n'); 821 for (var i = 0; i < oldLines.length; ++i) { 822 if (i === lineNumber) 823 lines.push(newContent); 824 else 825 lines.push(oldLines[i]); 826 } 815 827 var location = this._content.sourceFrameLineNumberToActualLocation(lineNumber); 816 if (!location.sourceID) 817 return; 818 819 function didEditLine(newContent) 820 { 821 var lines = []; 822 var oldLines = this._content.text.split('\n'); 823 for (var i = 0; i < oldLines.length; ++i) { 824 if (i === lineNumber) 825 lines.push(newContent); 826 else 827 lines.push(oldLines[i]); 828 } 829 WebInspector.debuggerModel.editScriptSource(location.sourceID, lines.join("\n")); 830 } 831 this._textViewer.editLine(lineRow, didEditLine.bind(this)); 828 WebInspector.debuggerModel.editScriptSource(location.sourceID, lines.join("\n")); 832 829 }, 833 830
Note: See TracChangeset
for help on using the changeset viewer.