OLD | NEW |
1 <!-- Valid src descriptor rules. --> | 1 <!-- Valid src descriptor rules. --> |
2 <style> | 2 <style> |
3 @font-face { | 3 @font-face { |
4 src: url(font.ttf); | 4 src: url(font.ttf); |
5 } | 5 } |
6 @font-face { | 6 @font-face { |
7 src: url(http://foo/bar/font.ttf); | 7 src: url(http://foo/bar/font.ttf); |
8 } | 8 } |
9 @font-face { | 9 @font-face { |
10 src: url(font.svg#id); | 10 src: url(font.svg#id); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 @font-face { | 62 @font-face { |
63 src: url(foo.ttf), invalid; | 63 src: url(foo.ttf), invalid; |
64 } | 64 } |
65 @font-face { | 65 @font-face { |
66 src: url(foo.ttf) "invalid"; | 66 src: url(foo.ttf) "invalid"; |
67 } | 67 } |
68 @font-face { | 68 @font-face { |
69 src: url(foo.ttf) !important; | 69 src: url(foo.ttf) !important; |
70 } | 70 } |
| 71 @font-face { |
| 72 src: initial; |
| 73 } |
| 74 @font-face { |
| 75 src: inherit; |
| 76 } |
| 77 @font-face { |
| 78 src: unset; |
| 79 } |
71 </style> | 80 </style> |
72 <p>Test parsing the src descriptor of @font-face.</p> | 81 <p>Test parsing the src descriptor of @font-face.</p> |
73 | 82 |
74 <p>Valid rules form the stylesheet:</p> | 83 <p>Valid rules form the stylesheet:</p> |
75 <div id="validResult"></div> | 84 <div id="validResult"></div> |
76 | 85 |
77 <p>Expected result for valid rules:</p> | 86 <p>Expected result for valid rules:</p> |
78 <pre id="validExpected">@font-face { src: url(font.ttf); } | 87 <pre id="validExpected">@font-face { src: url(font.ttf); } |
79 @font-face { src: url(http://foo/bar/font.ttf); } | 88 @font-face { src: url(http://foo/bar/font.ttf); } |
80 @font-face { src: url(font.svg#id); } | 89 @font-face { src: url(font.svg#id); } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 document.getElementById('validResult').innerText = result; | 126 document.getElementById('validResult').innerText = result; |
118 | 127 |
119 var invalidRules = document.styleSheets[1].cssRules; | 128 var invalidRules = document.styleSheets[1].cssRules; |
120 result = ''; | 129 result = ''; |
121 for (var i = 0; i < invalidRules.length; ++i) { | 130 for (var i = 0; i < invalidRules.length; ++i) { |
122 var itemText = invalidRules.item(i).cssText.replace(/file:.*LayoutTests\/fas
t\/css\//, ''); | 131 var itemText = invalidRules.item(i).cssText.replace(/file:.*LayoutTests\/fas
t\/css\//, ''); |
123 result += itemText + '\n'; | 132 result += itemText + '\n'; |
124 } | 133 } |
125 document.getElementById('invalidResult').innerText = result; | 134 document.getElementById('invalidResult').innerText = result; |
126 </script> | 135 </script> |
OLD | NEW |