| <head> |
| <style> |
| /* Base form of the rule: */ |
| /*em */ #a { font-size: 1em; } |
| /*em */ #b { font-size: 1\65m; } |
| /*em */ #c { font-size: 1\65\6D; } |
| /*em */ #d { font-size: 1\65\6d; } |
| /*rEm */ #e { font-size: 1rEm; } /* */ |
| /*Ex */ #f { font-size: 1\45x; } |
| /*px */ #g { font-size: 16px; } |
| /*Px */ #h { font-size: 16Px; } |
| /*px */ #i { font-size: 16\70\78; } |
| /*pX */ #j { font-size: 16\70 X; } |
| /*Cm */ #k { font-size: 1Cm;} |
| /*MM */ #l { font-size: 1M\4d;} |
| /*In */ #m { font-size: 1In;} |
| /*pt */ #n { font-size: 12pt; } |
| /*pt */ #o { font-size: 16p\78; } |
| /*PC */ #p { font-size: 1\70 C;} |
| /*% */ #q { font-size: 100%;} |
| /*mS #r { pause: 2000mS; } */ |
| /*KhZ #s { pitch: 105KhZ; } */ |
| </style> |
| |
| <script> |
| |
| function runTest() |
| { |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var rules = document.styleSheets[0].cssRules; |
| var text = ""; |
| for (var i = 0; i < rules.length; i++) { |
| text += rules.item(i).cssText; |
| text += "\n"; |
| } |
| |
| document.getElementById("result").appendChild(document.createTextNode(text)); |
| |
| if (document.getElementById("result").firstChild.data === document.getElementById("expected").firstChild.data) |
| document.getElementById("message").firstChild.data = "SUCCESS"; |
| else |
| document.getElementById("message").firstChild.data = "FAILURE"; |
| } |
| |
| </script> |
| |
| </head> |
| |
| <body onload="runTest()"> |
| |
| <p>Test parsing of CSS number types.</p> |
| |
| <p id="message">TEST DID NOT COMPLETE</p> |
| |
| <p>Rules from the stylesheet:</p> |
| |
| <pre id="result"></pre> |
| |
| <p>Expected result:</p> |
| |
| <pre id="expected">#a { font-size: 1em; } |
| #b { font-size: 1em; } |
| #c { font-size: 1em; } |
| #d { font-size: 1em; } |
| #e { font-size: 1rem; } |
| #f { font-size: 1ex; } |
| #g { font-size: 16px; } |
| #h { font-size: 16px; } |
| #i { font-size: 16px; } |
| #j { font-size: 16px; } |
| #k { font-size: 1cm; } |
| #l { font-size: 1mm; } |
| #m { font-size: 1in; } |
| #n { font-size: 12pt; } |
| #o { font-size: 16px; } |
| #p { font-size: 1pc; } |
| #q { font-size: 100%; } |
| <!--#r { pause: 2000ms; } |
| #s { pitch: 105kHz; } --> |
| </pre> |
| <script> |
| |
| </script> |
| </body> |