Make a test that would simulate some code input into text editor and check if it formats it correctly.
Created attachment 182428 [details] Patch
Comment on attachment 182428 [details] Patch Attachment 182428 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/15817140 New failing tests: inspector/editor/text-editor-formatter.html
Comment on attachment 182428 [details] Patch Attachment 182428 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15822195 New failing tests: inspector/editor/text-editor-formatter.html
Comment on attachment 182428 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182428&action=review > LayoutTests/inspector/editor/text-editor-formatter.html:12 > + function enter() { { on the next line. > LayoutTests/inspector/editor/text-editor-formatter.html:16 > + function printLine(line) { ditto and move this into editor-test.js InspectorTest.printEditorLine > LayoutTests/inspector/editor/text-editor-formatter.html:24 > + var textEditor = new WebInspector.DefaultTextEditor("", new WebInspector.TextEditorDelegate()); You should use editor test's implementation. > LayoutTests/inspector/editor/text-editor-formatter.html:26 > + textEditor.mimeType="text/javascript"; mimeType = > LayoutTests/inspector/editor/text-editor-formatter.html:51 > + testRunner.closeWebInspector(); try calling InspectorFrontendHost.bringToFront instead. > LayoutTests/inspector/editor/text-editor-formatter.html:68 > +function foo(n) { declare it in test and use its toString().split("\n")
Created attachment 182572 [details] Patch
Comment on attachment 182572 [details] Patch Attachment 182572 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/15870546 New failing tests: inspector/editor/text-editor-formatter.html
Created attachment 182582 [details] Patch
Comment on attachment 182582 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=182582&action=review > LayoutTests/inspector/editor/editor-test.js:22 > +function enter() Please declare it inline > LayoutTests/inspector/editor/text-editor-formatter.html:21 > + for(var i = 0; i < codeLines.length; ++i) { Remove {} > LayoutTests/inspector/editor/text-editor-formatter.html:54 > + function bar() { { on the next line
Created attachment 182585 [details] Patch
Comment on attachment 182585 [details] Patch Clearing flags on attachment: 182585 Committed r139617: <http://trac.webkit.org/changeset/139617>
All reviewed patches have been landed. Closing bug.