OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script> |
| 4 if (window.testRunner) |
| 5 testRunner.dumpAsText(); |
| 6 </script> |
| 7 </head> |
| 8 <body> |
| 9 <div id="foo">Test</div> |
| 10 <script> |
| 11 function testFontValue(value) |
| 12 { |
| 13 document.write("Font for '" + value + "':<br>"); |
| 14 var element = document.getElementById("foo"); |
| 15 var decl = element.style; |
| 16 decl.font = ""; |
| 17 decl.font = value; |
| 18 for (var i = 0; i < decl.length; i++) { |
| 19 document.write(decl[i] + ": " + decl.getPropertyValue(decl[i])); |
| 20 document.write("<br>"); |
| 21 } |
| 22 document.write("<br>"); |
| 23 } |
| 24 |
| 25 testFontValue("caption"); |
| 26 testFontValue("icon"); |
| 27 testFontValue("menu"); |
| 28 testFontValue("message-box"); |
| 29 testFontValue("small-caption"); |
| 30 testFontValue("status-bar"); |
| 31 testFontValue("-webkit-mini-control"); |
| 32 testFontValue("-webkit-small-control"); |
| 33 testFontValue("-webkit-control"); |
| 34 |
| 35 // Invalid values should yield no longhands. |
| 36 testFontValue("caption italic"); |
| 37 testFontValue("icon 12px"); |
| 38 testFontValue("icon 12px serif"); |
| 39 testFontValue("menu italic 12px"); |
| 40 </script> |
| 41 </body> |
| 42 </html> |
OLD | NEW |