| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
| 4 <style> | 4 <style> |
| 5 @font-face { | 5 @font-face { |
| 6 font-family: 'Ahem'; | 6 font-family: 'Ahem'; |
| 7 src: url(../../resources/Ahem.ttf); | 7 src: url(../../resources/Ahem.ttf); |
| 8 font-style: italic; | 8 font-style: italic; |
| 9 font-weight: 300; | 9 font-weight: 300; |
| 10 unicode-range: U+0-3FF; | 10 unicode-range: U+0-3FF; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 modifiedFace.variant = 'small-caps'; | 59 modifiedFace.variant = 'small-caps'; |
| 60 modifiedFace.featureSettings = "'dlig' 1, 'liga' 0"; | 60 modifiedFace.featureSettings = "'dlig' 1, 'liga' 0"; |
| 61 shouldBeEqualToString('modifiedFace.family', 'modified'); | 61 shouldBeEqualToString('modifiedFace.family', 'modified'); |
| 62 shouldBeEqualToString('modifiedFace.style', 'italic'); | 62 shouldBeEqualToString('modifiedFace.style', 'italic'); |
| 63 shouldBeEqualToString('modifiedFace.weight', '900'); | 63 shouldBeEqualToString('modifiedFace.weight', '900'); |
| 64 shouldBeEqualToString('modifiedFace.unicodeRange', 'U+0-3FF'); | 64 shouldBeEqualToString('modifiedFace.unicodeRange', 'U+0-3FF'); |
| 65 shouldBeEqualToString('modifiedFace.variant', 'small-caps'); | 65 shouldBeEqualToString('modifiedFace.variant', 'small-caps'); |
| 66 shouldBeEqualToString('modifiedFace.featureSettings', "'dlig' 1, 'liga' 0"); | 66 shouldBeEqualToString('modifiedFace.featureSettings', "'dlig' 1, 'liga' 0"); |
| 67 | 67 |
| 68 debug(''); | 68 debug(''); |
| 69 var syntaxError = "'SyntaxError: An invalid or illegal string was specified.
'"; | 69 shouldThrow("new FontFace('test', 'invalid_src', {})"); |
| 70 shouldThrow("new FontFace('test', 'invalid_src', {})", syntaxError); | |
| 71 face = new FontFace('test', 'local(foo)', {}); | 70 face = new FontFace('test', 'local(foo)', {}); |
| 72 shouldThrow("face.style = ''", syntaxError); | 71 shouldThrow("face.style = ''"); |
| 73 shouldThrow("face.weight = 'a'", syntaxError); | 72 shouldThrow("face.weight = 'a'"); |
| 74 shouldThrow("face.unicodeRange = 'U+'", syntaxError); | 73 shouldThrow("face.unicodeRange = 'U+'"); |
| 75 shouldThrow("face.variant = '???'", syntaxError); | 74 shouldThrow("face.variant = '???'"); |
| 76 shouldThrow("face.featureSettings = null", syntaxError); | 75 shouldThrow("face.featureSettings = null"); |
| 77 } | 76 } |
| 78 | 77 |
| 79 if (document.fonts) | 78 if (document.fonts) |
| 80 runTests(); | 79 runTests(); |
| 81 else { | 80 else { |
| 82 testFailed('document.fonts does not exist'); | 81 testFailed('document.fonts does not exist'); |
| 83 } | 82 } |
| 84 </script> | 83 </script> |
| 85 </head> | 84 </head> |
| 86 <body> | 85 <body> |
| 87 </body> | 86 </body> |
| 88 </html> | 87 </html> |
| OLD | NEW |