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..6b035a795845b0718328553bb1a7f33163f0444c 100644 |
--- a/LayoutTests/inspector/documentation/document-parser.html |
+++ b/LayoutTests/inspector/documentation/document-parser.html |
@@ -11,12 +11,15 @@ function test() |
function testWikiParser(next) |
{ |
var testCases = [ |
+ "{{A|Code= var nod{{=}}document.createElement(\"li\");\ndocument.getElementById(\"oUL1\").insertBefore(nod, document.getElementById(\"oLIYellow\"));\nnod.textContet{{=}}\"Orange\"}}", |
+ "{{A|Code={{=}} }}", |
+ "{{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}}"]; |
for (var i = 0; i < testCases.length; i++) { |
var wikiParser = new WebInspector.WikiParser(testCases[i]); |
InspectorTest.addResult("\"" + testCases[i].replace("\r", "\\r") + "\" is parsed"); |
@@ -108,6 +111,7 @@ function test() |
function testExamples(next) |
{ |
var examplesTest = "{{Examples_Section\n|Not_required=No\n|Examples={{Single Example\n|Language=HTML\n|Description=The following example shows how to use the '''insertBefore''' method to insert a new item into an existing list.\n|Code=<!doctype html>\n<html>\n<head>\n<script type{{=}}\"application/javascript\">\n function insertElement()\n {\n var nod{{=}}document.createElement(\"li\");\n document.getElementById(\"oUL1\").insertBefore(nod, document.getElementById(\"oLIYellow\"));\n nod.textContet{{=}}\"Orange\";\n }\n</script>\n</head>\n<body>\n <p onclick{{=}}\"insertElement()\">Click <strong>HERE</strong> to add an item to the following list.</p>\n <ul id{{=}}\"oUL1\">\n <li id{{=}}\"oLIRed\">Red</li>\n <li id{{=}}\"oLIYellow\">Yellow</li>\n <li id{{=}}\"oLIBlue\">Blue</li>\n </ul>\n</body>\n</html>\n|LiveURL=http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/insertBefore.htm\n}}\n}}"; |
+ debugger; |
lushnikov
2014/09/08 14:08:29
remove
iliia
2014/09/08 15:20:49
Done.
|
var article = WebInspector.JSArticle.parse(examplesTest); |
InspectorTest.addObject(article); |
next(); |
@@ -124,13 +128,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(error); |
lushnikov
2014/09/08 14:08:29
prepend with "Expected error: "
iliia
2014/09/08 15:20:49
Done.
|
+ } |
next(); |
} |
]); |
} |
- |
</script> |
</head> |