Chromium Code Reviews| Index: LayoutTests/inspector/documentation/document-parser-expected.txt |
| diff --git a/LayoutTests/inspector/documentation/document-parser-expected.txt b/LayoutTests/inspector/documentation/document-parser-expected.txt |
| index 53a4d6b69a80f2ae613fdf1890f0fc55ef462240..904c91b2f67c756ad5990752e8b8b6da065f19ac 100644 |
| --- a/LayoutTests/inspector/documentation/document-parser-expected.txt |
| +++ b/LayoutTests/inspector/documentation/document-parser-expected.txt |
| @@ -1,28 +1,180 @@ |
| Running: testWikiParser |
| -"{{A|B={{C|D=blablabla}}}}" is parsed |
| +"{{A|Code={{=}} }}" is parsed |
| +{ |
| + A : { |
| + Code : "=" |
| + } |
| +} |
| +"{{A|B=C}}" is parsed |
| { |
| A : { |
| B : { |
| - C : { |
| - D : "blablabla" |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "C" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| +} |
| +"{{A|B={{C|D=blablabla}}}}" is parsed |
| +{ |
| + A : { |
| + B : [ |
| + { |
| + C : { |
| + D : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "blablabla" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| + } |
| + ] |
| + } |
| +} |
| +"{{A|B={{C|D=bla}}|x=y}}" is parsed |
| +{ |
| + A : { |
| + B : [ |
| + { |
| + C : { |
| + D : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "bla" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| } |
| + ] |
| + x : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "y" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| } |
| } |
| } |
| "{{CS|Init=black|Values={{CSS Property Value |
| |Data Type=color |
| -|Description=[[css/color|CSS color value]]}} |
| +|Description= [[css/color|CSS color value]]}} |
| }}" is parsed |
| { |
| CS : { |
| - Init : "black" |
| - Values : { |
| - CSS Property Value : { |
| - Data Type : "color" |
| - Description : "[[css/color|CSS color value]]" |
| - } |
| + Init : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "black" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| } |
| + Values : [ |
| + { |
| + CSS Property Value : { |
| + Data Type : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "color" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + Description : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "CSS color value" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _type : "Inline" |
| + } |
| + ] |
| + _type : "Link" |
| + _url : "css/color" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| + } |
| + ] |
| } |
| } |
| "{{A}}" is parsed |
| @@ -30,22 +182,137 @@ Running: testWikiParser |
| A : { |
| } |
| } |
| -"{{A|B=bla<a=c>bla}}" is parsed |
| +"{{A|B= [[google.com{{!}}Google]]}}" is parsed |
| { |
| A : { |
| - B : "bla<a=c>bla" |
| + B : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "Google" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _type : "Inline" |
| + } |
| + ] |
| + _type : "Link" |
| + _url : "google.com" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| } |
| } |
| -"{{A}}" is parsed |
| +"{{AbC|xyz |
| + \r}}" is parsed |
| { |
| - A : { |
| + AbC : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "xyz" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| } |
| } |
| -"{{AbC|xyz |
| - \r}}" is parsed |
| +"{{External_Attribution|MSDN_link=[http://msdn.microsoft.com/en-us/library/ie/ms536365(v=vs.85).aspx cloneNode Method]|HTML5Rocks_link=}}" is parsed |
| +{ |
| + External_Attribution : { |
| + MSDN_link : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : false |
| + _text : "[http://msdn.microsoft.com/en-us/library/ie/ms536365(v=vs.85).aspx cloneNode Method]" |
|
lushnikov
2014/09/09 12:40:45
and this is not going to be rendered as a link.. h
iliia
2014/09/09 14:29:17
Yes, because it's a link without space in the begi
|
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| +} |
| +"{{JS_Syntax|Formats={{JS Syntax Format|Format='''JSON.stringify(''' value [ , replacer] [ , space] ''')'''}} |
| +}}" is parsed |
| { |
| - AbC : "xyz |
| - " |
| + JS_Syntax : { |
| + Formats : [ |
| + { |
| + JS Syntax Format : { |
| + Format : { |
| + _children : [ |
| + { |
| + _children : [ |
| + { |
| + _isHighlighted : true |
| + _text : "JSON.stringify(" |
| + _type : "PlainText" |
| + } |
| + { |
| + _isHighlighted : false |
| + _text : " value" |
| + _type : "PlainText" |
| + } |
| + { |
| + _children : [ |
| + ] |
| + _type : "Link" |
| + _url : " , replacer" |
|
lushnikov
2014/09/09 12:40:45
so it looks like we gonna parse this as a link? Th
iliia
2014/09/09 14:29:17
Yes, because there is a brackets with a space in t
|
| + } |
| + { |
| + _children : [ |
| + ] |
| + _type : "Link" |
| + _url : " , space" |
| + } |
| + { |
| + _isHighlighted : false |
| + _text : " " |
| + _type : "PlainText" |
| + } |
| + { |
| + _isHighlighted : true |
| + _text : ")" |
| + _type : "PlainText" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + ] |
| + _hasBullet : false |
| + _type : "Block" |
| + } |
| + } |
| + } |
| + ] |
| + } |
| } |
|
lushnikov
2014/09/09 12:40:45
lets add a test for the table to make sure we don'
iliia
2014/09/09 14:29:17
Done.
|
| Running: testJS |
| @@ -123,6 +390,7 @@ Running: testJS |
| _hasBullet : false |
| _type : "Block" |
| } |
| + summary : undefined |
| } |
| Running: testSmall |
| @@ -131,6 +399,7 @@ Running: testSmall |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -161,6 +430,7 @@ Running: testHighlightAndLink |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -269,6 +539,7 @@ Running: testNamedLink |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -305,6 +576,7 @@ Running: testBullet |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -444,6 +716,7 @@ console.log(Object.keys(my_array)); |
| _hasBullet : false |
| _type : "Block" |
| } |
| + summary : undefined |
| } |
| Running: testComplexLinkName |
| @@ -452,6 +725,7 @@ Running: testComplexLinkName |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -498,6 +772,7 @@ Running: testCodeInsideBullet |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -528,7 +803,6 @@ Running: testCodeInsideBullet |
| } |
| Running: testInvalidInput |
| -error: Can't parse remarks |
| [object Object] |
| Running: testLinkInsideCode |
| @@ -537,6 +811,7 @@ Running: testLinkInsideCode |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| summary : { |
| _children : [ |
| { |
| @@ -635,6 +910,8 @@ Running: testExamples |
| ] |
| parameters : [ |
| ] |
| + remarks : null |
| + summary : undefined |
| } |
| Running: testJsMethod |
| @@ -691,15 +968,10 @@ Running: testJsMethod |
| optional : true |
| } |
| ] |
| + remarks : null |
| + summary : undefined |
| } |
| Running: testLinkWithoutSpace |
| -error: Can't parse summary |
| -{ |
| - examples : [ |
| - ] |
| - parameters : [ |
| - ] |
| - summary : null |
| -} |
| +Expected error: Error: Two closing braces expected; found WRONG_LINK |