Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / documentation / document-parser.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script>
5
6 function test()
7 {
8     InspectorTest.registerModule("documentation", true);
9     var testCases = [
10         "{{A|B={{C|D=blablabla}}}}",
11         "{{CS|Init=black|Values={{CSS Property Value\n|Data Type=color\n|Description=[[css/color|CSS color value]]}}\n}}",
12         "{{A}}",
13         "{{A|B=bla<a=c>bla}}",
14         "{{A}}",
15         "{{AbC|xyz \n \t \r}}"];
16     for (var i = 0; i < testCases.length; i++) {
17         var wikiParser = new WebInspector.WikiParser(testCases[i]);
18         InspectorTest.addResult("\"" + testCases[i].replace("\r", "\\r") + "\" is parsed");
19         InspectorTest.addObject(wikiParser.document());
20     }
21
22     var jsTest = "{{Page_Title}}\n{{Flags}}\n{{Summary_Section|Returns the larger of a set of supplied numeric expressions.\n\n}}\n{{JS_Syntax|Formats={{JS_Syntax_Format\n|Format= Math.max([ number1 [, number2 [... [, numberN ]]]]) }}\n}}\n{{Remarks_Section\n|Remarks=The optional number1, number2, ..., numberN arguments are numeric expressions to be evaluated.\n\nIf no arguments are provided, the return value is equal to [[javascript/Number/constants{{!}}Number.NEGATIVE_INFINITY]]. If any argument is '''NaN''' , the return value is also '''NaN'''.\n}}\n{{Examples_Section\n|Not_required=No\n|Examples={{Single_Example\n|Language=JavaScript\n|Description=The following code shows how to get the larger of two expressions.\n\n|Code= var x = Math.max(107 - 3,  48 * 90);\n document.write(x);\n \n // Output:\n // 4320\n}}}}\n{{See_Also_Section\n|Manual_links=* [[javascript/Math/min{{!}}Math.min Function]]\n}}\n{{Topics | JS Basic}}\n\n{{External_Attribution\n|Is_CC-BY-SA=No\n|Sources=MSDN\n|MDN_link=\n|MSDN_link=http://msdn.microsoft.com/en-us/library/ie/yek4tbz0%28v=vs.94%29.aspx Windows Internet Explorer JavaScript reference\n|HTML5Rocks_link=\n}}";
23     var article = WebInspector.JSArticle.parse(jsTest);
24     InspectorTest.addObject(article);
25
26     var cssTest = "{{Page_Title}}\n{{Flags\n|State=Ready to Use\n|Checked_Out=No\n}}\n{{Standardization_Status|W3C Recommendation}}\n{{API_Name}}\n{{Summary_Section|The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a).}}\n{{CSS Property\n|Initial value=black, except in a few cases (see notes)\n|Applies to=All elements\n|Inherited=Yes\n|Media=visual\n|Computed value=For a non-translucent color, an hexadecimal equivalent is used. Otherwise it is the RGBa equivalent\n|Animatable=Yes\n|CSS object model property=color\n|CSS percentages=NA\n|Values={{CSS Property Value\n|Data Type=color\n|Description=[[css/color|CSS color value]]\n}}\n}}\n{{Examples_Section\n|Not_required=No\n|Examples={{Single Example\n|Language=CSS\n|Code=/* Setting a paragraph color to turquoise with a name value */\np {color:turquoise}\n\n/* Setting the same propriety with an hexadecimal value*/\np {color:#40E0D0}\n\n/* with a RGB decimal value */\np { color: rgb(64,224,208) }\n\n/* with a RGB percentage value */\np { color: rgb(25.1%,87.8%,81.6%) }\n\n/* with an HSL value */\np { color: hsl(174,72%,56%) }\n\n/* We now want our color to be 20% translucent which means a 80% opacity */\n\n/* We can achieve this with an RGBa value */ \np { color: rgba(64,224,208,0.8) }\n\n/* Or an HSLa value */\np { color: hsla(174,72%,56%,0.8) }\n|LiveURL=http://code.webplatform.org/gist/5502992\n}}\n}}\n{{Notes_Section\n|Usage=Though CSS color values are precisely defined, they may appear differently between different output devices. Most of them are not calibrated, and some browsers do not support output device color profiles. Without these, color rendering may vary significantly.\n|Notes==== Default color ===\nSome browsers change the default color from black to another color in their default css (user-agent stylesheet).\n\n=== RGB, HSL, RGBa and HSLa support ===\nHSL, RGBa and HSLa are not supported by older browsers (IE6-8), therefore if you do use such colours you should also provide a fallback color property that uses something similar but more widely supported, like a hex value. This should be placed either next to the modern color value but earlier in the cascade, or in a separate stylesheet hidden behind a conditional comment.\n\n=== Separating foreground from background ===\nIn order to make it easier for users to see and hear content including separating foreground from background, [[http://www.w3.org/TR/2008/REC-WCAG20-20081211/ WCAG]] indicates the following:\n* color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. [[http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-without-color Guideline 1.4.1]] (Level A)\n* The visual presentation of text and images of text has a minimum contrast ratio of at least 4.5:1, with some exceptions. [[http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast Contrast Minimum Guideline 1.4.3]] (Level AA)\n* The visual presentation of text and images of text has an enhanced contrast ratio of at least 7:1 [[http://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast7 Guideline 1.4.6]] (Level AAA)\n}}\n{{Related_Specifications_Section\n|Specifications={{Related Specification\n|Name=CSS3 Color Module Level 3\n|URL=http://www.w3.org/TR/css3-color/\n|Status=W3C Recommendation\n}}{{Related Specification\n|Name=Color in CSS1\n|URL=http://www.w3.org/TR/REC-CSS1/#color\n|Status=W3C Recommendation\n}}\n}}\n{{Compatibility_Section\n|Not_required=No\n|Imported_tables=\n|Desktop_rows={{Compatibility Table Desktop Row\n|Feature=Keywords and hexadecimals colors\n|Chrome_supported=Yes\n|Chrome_version=1.0\n|Chrome_prefixed_supported=No\n|Chrome_prefixed_version=\n|Firefox_supported=Yes\n|Firefox_version=1.0\n|Firefox_prefixed_supported=No\n|Firefox_prefixed_version=\n|Internet_explorer_supported=Yes\n|Internet_explorer_version=3.0\n|Internet_explorer_prefixed_supported=No\n|Internet_explorer_prefixed_version=\n|Opera_supported=Yes\n|Opera_version=3.5\n|Opera_prefixed_supported=No\n|Opera_prefixed_version=\n|Safari_supported=Yes\n|Safari_version=1.0\n|Safari_prefixed_supported=No\n|Safari_prefixed_version=\n}}{{Compatibility Table Desktop Row\n|Feature=RGB\n|Chrome_supported=Yes\n|Chrome_version=1.0\n|Chrome_prefixed_supported=No\n|Chrome_prefixed_version=\n|Firefox_supported=Yes\n|Firefox_version=1.0\n|Firefox_prefixed_supported=No\n|Firefox_prefixed_version=\n|Internet_explorer_supported=Yes\n|Internet_explorer_version=4.0\n|Internet_explorer_prefixed_supported=No\n|Internet_explorer_prefixed_version=\n|Opera_supported=Yes\n|Opera_version=3.5\n|Opera_prefixed_supported=No\n|Opera_prefixed_version=\n|Safari_supported=Yes\n|Safari_version=1.0\n|Safari_prefixed_supported=No\n|Safari_prefixed_version=\n}}{{Compatibility Table Desktop Row\n|Feature=HSL\n|Chrome_supported=Yes\n|Chrome_version=1.0\n|Chrome_prefixed_supported=No\n|Chrome_prefixed_version=\n|Firefox_supported=Yes\n|Firefox_version=1.0\n|Firefox_prefixed_supported=No\n|Firefox_prefixed_version=\n|Internet_explorer_supported=Yes\n|Internet_explorer_version=9.0\n|Internet_explorer_prefixed_supported=No\n|Internet_explorer_prefixed_version=\n|Opera_supported=Yes\n|Opera_version=9.5\n|Opera_prefixed_supported=No\n|Opera_prefixed_version=\n|Safari_supported=Yes\n|Safari_version=3.1\n|Safari_prefixed_supported=Unknown\n|Safari_prefixed_version=\n}}{{Compatibility Table Desktop Row\n|Feature=Translucent color value (RGBa, HSLa)\n|Chrome_supported=Yes\n|Chrome_version=1.0\n|Chrome_prefixed_supported=No\n|Chrome_prefixed_version=\n|Firefox_supported=Yes\n|Firefox_version=3.0\n|Firefox_prefixed_supported=No\n|Firefox_prefixed_version=\n|Internet_explorer_supported=Yes\n|Internet_explorer_version=9\n|Internet_explorer_prefixed_supported=No\n|Internet_explorer_prefixed_version=\n|Opera_supported=Yes\n|Opera_version=10\n|Opera_prefixed_supported=No\n|Opera_prefixed_version=\n|Safari_supported=Yes\n|Safari_version=3.0\n|Safari_prefixed_supported=Unknown\n|Safari_prefixed_version=\n}}\n|Mobile_rows={{Compatibility Table Mobile Row\n|Android_supported=Yes\n|Android_version=1.0\n|Android_prefixed_supported=No\n|Android_prefixed_version=\n|Blackberry_supported=Yes\n|Blackberry_version=3.8\n|Blackberry_prefixed_supported=No\n|Blackberry_prefixed_version=\n|Chrome_mobile_supported=Yes\n|Chrome_mobile_version=1.0\n|Chrome_mobile_prefixed_supported=No\n|Chrome_mobile_prefixed_version=\n|Firefox_mobile_supported=Yes\n|Firefox_mobile_version=1.0\n|Firefox_mobile_prefixed_supported=No\n|Firefox_mobile_prefixed_version=\n|IE_mobile_supported=Yes\n|IE_mobile_version=6.0\n|IE_mobile_prefixed_supported=No\n|IE_mobile_prefixed_version=\n|Opera_mobile_supported=Yes\n|Opera_mobile_version=6.0\n|Opera_mobile_prefixed_supported=No\n|Opera_mobile_prefixed_version=\n|Opera_mini_supported=Yes\n|Opera_mini_prefixed_supported=No\n|Opera_mini_prefixed_version=\n|Safari_mobile_supported=Yes\n|Safari_mobile_version=1.0\n|Safari_mobile_prefixed_supported=No\n|Safari_mobile_prefixed_version=\n}}{{Compatibility Table Mobile Row\n|Feature=Translucent color value (RGBa, HSLa)\n|Android_supported=Yes\n|Android_version=2.1\n|Android_prefixed_supported=No\n|Android_prefixed_version=\n|Blackberry_supported=Yes\n|Blackberry_version=7.0\n|Blackberry_prefixed_supported=No\n|Blackberry_prefixed_version=\n|Chrome_mobile_supported=Yes\n|Chrome_mobile_version=18\n|Chrome_mobile_prefixed_supported=No\n|Chrome_mobile_prefixed_version=\n|Firefox_mobile_supported=Yes\n|Firefox_mobile_version=18\n|Firefox_mobile_prefixed_supported=No\n|Firefox_mobile_prefixed_version=\n|IE_mobile_supported=Yes\n|IE_mobile_version=9\n|IE_mobile_prefixed_supported=No\n|IE_mobile_prefixed_version=\n|Opera_mobile_supported=Yes\n|Opera_mobile_version=10\n|Opera_mobile_prefixed_supported=No\n|Opera_mobile_prefixed_version=\n|Opera_mini_supported=Yes\n|Opera_mini_version=5.0\n|Opera_mini_prefixed_supported=No\n|Opera_mini_prefixed_version=\n|Safari_mobile_supported=Yes\n|Safari_mobile_version=3.2\n|Safari_mobile_prefixed_supported=Unknown\n|Safari_mobile_prefixed_version=\n}}\n|Notes_rows={{Compatibility Notes Row\n|Browser=Internet Explorer\n|Version=<=7.0\n|Note=no support for the \"inherit\" value\n}}\n}}\n{{See_Also_Section\n|Manual_links=* [[tutorials/setting_color_in_css|Setting color in CSS]]\n* [[css/color|color]]\n* [[css/data_types/color|color]]\n|Manual_sections=*[http://www.w3.org/Style/CSS/Test/CSS3/Color/current/ W3 css3-color Conformance Test Suite]\n*[https://developer.mozilla.org/en-US/docs/CSS/color MDN color property]\n*[http://msdn.microsoft.com/en-us/library/ie/ms530749(v=vs.85).aspx MSDN color property]\n}}\n{{Topics|CSS}}\n{{External_Attribution\n|Is_CC-BY-SA=No\n|MDN_link=\n|MSDN_link=\n|HTML5Rocks_link=\n}}";
27     article = WebInspector.CSSArticle.parse(cssTest);
28     InspectorTest.addObject(article);
29
30     InspectorTest.completeTest();
31 }
32
33 </script>
34 </head>
35
36 <body onload="runTest()">
37
38 </body>
39 </html>