Bug 106705 - Web Inspector: add text editor formatter test
Summary: Web Inspector: add text editor formatter test
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Lushnikov
URL:
Keywords:
Depends on: 106650 106883
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-11 14:56 PST by Andrey Lushnikov
Modified: 2013-01-15 01:34 PST (History)
12 users (show)

See Also:


Attachments
Patch (4.74 KB, patch)
2013-01-11 15:06 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (5.52 KB, patch)
2013-01-14 07:21 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (5.53 KB, patch)
2013-01-14 08:42 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (5.53 KB, patch)
2013-01-14 08:55 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Lushnikov 2013-01-11 14:56:49 PST
Make a test that would simulate some code input into text editor and check if it formats it correctly.
Comment 1 Andrey Lushnikov 2013-01-11 15:06:47 PST
Created attachment 182428 [details]
Patch
Comment 2 Build Bot 2013-01-11 19:27:59 PST
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 3 WebKit Review Bot 2013-01-11 21:39:12 PST
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 4 Pavel Feldman 2013-01-14 01:38:10 PST
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")
Comment 5 Andrey Lushnikov 2013-01-14 07:21:19 PST
Created attachment 182572 [details]
Patch
Comment 6 WebKit Review Bot 2013-01-14 08:23:01 PST
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
Comment 7 Andrey Lushnikov 2013-01-14 08:42:24 PST
Created attachment 182582 [details]
Patch
Comment 8 Pavel Feldman 2013-01-14 08:49:12 PST
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
Comment 9 Andrey Lushnikov 2013-01-14 08:55:16 PST
Created attachment 182585 [details]
Patch
Comment 10 WebKit Review Bot 2013-01-14 09:26:29 PST
Comment on attachment 182585 [details]
Patch

Clearing flags on attachment: 182585

Committed r139617: <http://trac.webkit.org/changeset/139617>
Comment 11 WebKit Review Bot 2013-01-14 09:26:33 PST
All reviewed patches have been landed.  Closing bug.