Changeset 199838 in webkit


Ignore:
Timestamp:
Apr 21, 2016 3:24:17 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Debugger statement gets a space after it when pretty printed
https://bugs.webkit.org/show_bug.cgi?id=156867
<rdar://problem/25862308>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-04-21
Reviewed by Geoffrey Garen.

Source/WebInspectorUI:

  • Tools/Formatting/index.html:
  • UserInterface/Workers/Formatter/EsprimaFormatter.js:

(EsprimaFormatter.prototype._handleTokenAtNode):
Handle the unhandled DebuggerStatement node type.

LayoutTests:

  • inspector/formatting/formatting-javascript-expected.txt:
  • inspector/formatting/formatting-javascript.html:
  • inspector/formatting/resources/javascript-tests/other-statements-expected.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement-expected.js.
  • inspector/formatting/resources/javascript-tests/other-statements.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement.js.
Location:
trunk
Files:
6 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r199835 r199838  
     12016-04-21  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Debugger statement gets a space after it when pretty printed
     4        https://bugs.webkit.org/show_bug.cgi?id=156867
     5        <rdar://problem/25862308>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * inspector/formatting/formatting-javascript-expected.txt:
     10        * inspector/formatting/formatting-javascript.html:
     11        * inspector/formatting/resources/javascript-tests/other-statements-expected.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement-expected.js.
     12        * inspector/formatting/resources/javascript-tests/other-statements.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement.js.
     13
    1142016-04-21  Brady Eidson  <beidson@apple.com>
    215
  • trunk/LayoutTests/inspector/formatting/formatting-javascript-expected.txt

    r199556 r199838  
    4242PASS
    4343
     44-- Running test case: EsprimaFormatter.JavaScript.other-statements.js
     45PASS
     46
    4447-- Running test case: EsprimaFormatter.JavaScript.return-statement.js
    4548PASS
     
    6366PASS
    6467
    65 -- Running test case: EsprimaFormatter.JavaScript.throw-statement.js
    66 PASS
    67 
    6868-- Running test case: EsprimaFormatter.JavaScript.try-catch-finally-statements.js
    6969PASS
  • trunk/LayoutTests/inspector/formatting/formatting-javascript.html

    r199556 r199838  
    2323        "resources/javascript-tests/new-expression.js",
    2424        "resources/javascript-tests/object-array-literal.js",
     25        "resources/javascript-tests/other-statements.js",
    2526        "resources/javascript-tests/return-statement.js",
    2627        "resources/javascript-tests/sample-jquery.js",
     
    3031        "resources/javascript-tests/template-strings.js",
    3132        "resources/javascript-tests/ternary-expressions.js",
    32         "resources/javascript-tests/throw-statement.js",
    3333        "resources/javascript-tests/try-catch-finally-statements.js",
    3434        "resources/javascript-tests/unary-binary-expressions.js",
  • trunk/LayoutTests/inspector/formatting/resources/javascript-tests/other-statements-expected.js

    r199837 r199838  
    88    a: 1
    99};
     10
     11debugger
     12debugger;
  • trunk/LayoutTests/inspector/formatting/resources/javascript-tests/other-statements.js

    r199837 r199838  
    66throw new x;
    77throw {a:1};
     8
     9debugger
     10debugger;
  • trunk/Source/WebInspectorUI/ChangeLog

    r199793 r199838  
     12016-04-21  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Debugger statement gets a space after it when pretty printed
     4        https://bugs.webkit.org/show_bug.cgi?id=156867
     5        <rdar://problem/25862308>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * Tools/Formatting/index.html:
     10        * UserInterface/Workers/Formatter/EsprimaFormatter.js:
     11        (EsprimaFormatter.prototype._handleTokenAtNode):
     12        Handle the unhandled DebuggerStatement node type.
     13
    1142016-04-20  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebInspectorUI/Tools/Formatting/index.html

    r199556 r199838  
    5353        "label-break-continue-block.js",
    5454        "with-statement.js",
    55         "throw-statement.js",
    5655        "return-statement.js",
     56        "other-statements.js",
    5757        "variable-declaration.js",
    5858        "functions.js",
  • trunk/Source/WebInspectorUI/UserInterface/Workers/Formatter/EsprimaFormatter.js

    r199168 r199838  
    786786            || nodeType === "RestElement"
    787787            || nodeType === "TemplateElement"
    788             || nodeType === "TemplateLiteral") {
     788            || nodeType === "TemplateLiteral"
     789            || nodeType === "DebuggerStatement") {
    789790            builder.appendToken(tokenValue, tokenOffset);
    790791            return;
Note: See TracChangeset for help on using the changeset viewer.