Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Unified Diff: LayoutTests/inspector/documentation/document-parser.html

Issue 539353004: DevTools: [Documentation] Update parser for WikiText (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add test for unescape symbols Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/documentation/document-parser-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/documentation/document-parser.html
diff --git a/LayoutTests/inspector/documentation/document-parser.html b/LayoutTests/inspector/documentation/document-parser.html
index cae3d0400e0e5f615f80af2e2e771dd3cb5fdb5f..04f25ff9983059cb175eeed07034676cf0f6043f 100644
--- a/LayoutTests/inspector/documentation/document-parser.html
+++ b/LayoutTests/inspector/documentation/document-parser.html
@@ -11,12 +11,19 @@ function test()
function testWikiParser(next)
{
var testCases = [
+ "{{A|text=<code>it's not a code <code>}}",
+ "{{A|Code={{=}} }}",
+ "{{ABC|Array={{A|B=c}}{{X|y=Z}}|text=blabla}}",
+ "{{A|B=C}}",
"{{A|B={{C|D=blablabla}}}}",
- "{{CS|Init=black|Values={{CSS Property Value\n|Data Type=color\n|Description=[[css/color|CSS color value]]}}\n}}",
+ "{{A|B={{C|D=bla}}|x=y}}",
+ "{{CS|Init=black|Values={{CSS Property Value\n|Data Type=color\n|Description= [[css/color|CSS color value]]}}\n}}",
"{{A}}",
- "{{A|B=bla<a=c>bla}}",
- "{{A}}",
- "{{AbC|xyz \n \t \r}}"];
+ "{{A|B= [[google.com{{!}}Google]]}}",
+ "{{AbC|xyz \n\t \r}}",
+ "{{Table|there is a table {{{!}}\n}}",
+ "{{External_Attribution|MSDN_link=[http://msdn.microsoft.com/en-us/library/ie/ms536365(v=vs.85).aspx cloneNode Method]|HTML5Rocks_link=}}",
+ "{{JS_Syntax|Formats={{JS Syntax Format|Format='''JSON.stringify(''' value [ , replacer] [ , space] ''')'''}}\n}}"];
for (var i = 0; i < testCases.length; i++) {
var wikiParser = new WebInspector.WikiParser(testCases[i]);
InspectorTest.addResult("\"" + testCases[i].replace("\r", "\\r") + "\" is parsed");
@@ -99,7 +106,7 @@ function test()
function testLinkInsideCode(next)
{
- var linkInsideCode = "{{Summary_Section|<code> [[google.com|GOOGLE!]] < /code>}}";
+ var linkInsideCode = "{{Summary_Section|<code> [[google.com|GOOGLE!]] </code >}}";
var article = WebInspector.JSArticle.parse(linkInsideCode);
InspectorTest.addObject(article);
next();
@@ -124,13 +131,16 @@ function test()
function testLinkWithoutSpace(next)
{
var linkWithoutSpaceTest = "{{Summary_Section|[[http://wrong.com|WRONG_LINK]]}}";
- var article = WebInspector.JSArticle.parse(linkWithoutSpaceTest);
- InspectorTest.addObject(article);
+ try {
+ var article = WebInspector.JSArticle.parse(linkWithoutSpaceTest);
+ InspectorTest.addObject(article);
+ } catch (error) {
+ InspectorTest.addResult("Expected error: " + error);
+ }
next();
}
]);
}
-
</script>
</head>
« no previous file with comments | « no previous file | LayoutTests/inspector/documentation/document-parser-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698