Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: LayoutTests/fast/css/font-face-src-parsing.html

Issue 1103273010: Add parseFontFaceDescriptor for @font-face handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: V5 Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/css/font-face-src-parsing-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/font-face-src-parsing-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698