| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test for Bug 41509 - Ranges for @font-face unicode-range must be separate
d by commas</title> | 4 <title>Test for Bug 41509 - Ranges for @font-face unicode-range must be separate
d by commas</title> |
| 5 <style> | 5 <style> |
| 6 .test { | 6 .test { |
| 7 border: solid 1px; | 7 border: solid 1px; |
| 8 } | 8 } |
| 9 | 9 |
| 10 /* Test 0: Comma-separated list, which is valid. */ | 10 /* Test 0: Comma-separated list, which is valid. */ |
| 11 @font-face { | 11 @font-face { |
| 12 font-family:myfont_0; | 12 font-family:myfont_0; |
| 13 src: local('Times'); | 13 src: local('Times New Roman'), local('Times'); |
| 14 } | 14 } |
| 15 @font-face { | 15 @font-face { |
| 16 font-family:myfont_0; | 16 font-family:myfont_0; |
| 17 src: local('Courier'); | 17 src: local('Courier New'), local('Courier'); |
| 18 unicode-range: u+69, u+6a; /* 'i' and 'j' */ | 18 unicode-range: u+69, u+6a; /* 'i' and 'j' */ |
| 19 } | 19 } |
| 20 | 20 |
| 21 /* Test 1: Comma-separated list with three elements, which is valid. */ | 21 /* Test 1: Comma-separated list with three elements, which is valid. */ |
| 22 @font-face { | 22 @font-face { |
| 23 font-family:myfont_1; | 23 font-family:myfont_1; |
| 24 src: local('Times'); | 24 src: local('Times New Roman'), local('Times'); |
| 25 } | 25 } |
| 26 @font-face { | 26 @font-face { |
| 27 font-family:myfont_1; | 27 font-family:myfont_1; |
| 28 src: local('Courier'); | 28 src: local('Courier New'), local('Courier'); |
| 29 unicode-range: u+69 , u+6a ,u+6c; /* 'i', 'j', and 'l' */ | 29 unicode-range: u+69 , u+6a ,u+6c; /* 'i', 'j', and 'l' */ |
| 30 } | 30 } |
| 31 | 31 |
| 32 /* Test 2: Comma-separated list with two consecutive commas, which is invalid. *
/ | 32 /* Test 2: Comma-separated list with two consecutive commas, which is invalid. *
/ |
| 33 @font-face { | 33 @font-face { |
| 34 font-family:myfont_2; | 34 font-family:myfont_2; |
| 35 src: local('Times'); | 35 src: local('Times New Roman'), local('Times'); |
| 36 } | 36 } |
| 37 @font-face { | 37 @font-face { |
| 38 font-family:myfont_2; | 38 font-family:myfont_2; |
| 39 src: local('Courier'); | 39 src: local('Courier New'), local('Courier'); |
| 40 unicode-range: u+69, , u+6a; /* 'i' and 'j' */ | 40 unicode-range: u+69, , u+6a; /* 'i' and 'j' */ |
| 41 } | 41 } |
| 42 | 42 |
| 43 /* Test 3: Comma-separated list with a trailing comma, which is invalid. */ | 43 /* Test 3: Comma-separated list with a trailing comma, which is invalid. */ |
| 44 @font-face { | 44 @font-face { |
| 45 font-family:myfont_3; | 45 font-family:myfont_3; |
| 46 src: local('Times'); | 46 src: local('Times New Roman'), local('Times'); |
| 47 } | 47 } |
| 48 @font-face { | 48 @font-face { |
| 49 font-family:myfont_3; | 49 font-family:myfont_3; |
| 50 src: local('Courier'); | 50 src: local('Courier New'), local('Courier'); |
| 51 unicode-range: u+69, u+6a,; /* 'i' and 'j' */ | 51 unicode-range: u+69, u+6a,; /* 'i' and 'j' */ |
| 52 } | 52 } |
| 53 | 53 |
| 54 /* Test 4: Comma-separated list with a leading comma, which is invalid. */ | 54 /* Test 4: Comma-separated list with a leading comma, which is invalid. */ |
| 55 @font-face { | 55 @font-face { |
| 56 font-family:myfont_4; | 56 font-family:myfont_4; |
| 57 src: local('Times'); | 57 src: local('Times New Roman'), local('Times'); |
| 58 } | 58 } |
| 59 @font-face { | 59 @font-face { |
| 60 font-family:myfont_4; | 60 font-family:myfont_4; |
| 61 src: local('Courier'); | 61 src: local('Courier New'), local('Courier'); |
| 62 unicode-range: , u+69, u+6a; /* 'i' and 'j' */ | 62 unicode-range: , u+69, u+6a; /* 'i' and 'j' */ |
| 63 } | 63 } |
| 64 | 64 |
| 65 /* Test 5: Space-separated list, which is invalid. */ | 65 /* Test 5: Space-separated list, which is invalid. */ |
| 66 @font-face { | 66 @font-face { |
| 67 font-family:myfont_5; | 67 font-family:myfont_5; |
| 68 src: local('Times'); | 68 src: local('Times New Roman'), local('Times'); |
| 69 } | 69 } |
| 70 @font-face { | 70 @font-face { |
| 71 font-family:myfont_5; | 71 font-family:myfont_5; |
| 72 src: local('Courier'); | 72 src: local('Courier New'), local('Courier'); |
| 73 unicode-range: u+69 u+6a ; /* 'i' and 'j' */ | 73 unicode-range: u+69 u+6a ; /* 'i' and 'j' */ |
| 74 } | 74 } |
| 75 | 75 |
| 76 /* Test 6: Slash-separated list, which is invalid. */ | 76 /* Test 6: Slash-separated list, which is invalid. */ |
| 77 @font-face { | 77 @font-face { |
| 78 font-family:myfont_6; | 78 font-family:myfont_6; |
| 79 src: local('Times'); | 79 src: local('Times New Roman'), local('Times'); |
| 80 } | 80 } |
| 81 @font-face { | 81 @font-face { |
| 82 font-family:myfont_6; | 82 font-family:myfont_6; |
| 83 src: local('Courier'); | 83 src: local('Courier New'), local('Courier'); |
| 84 unicode-range: u+69/u+6a; /* 'i' and 'j' */ | 84 unicode-range: u+69/u+6a; /* 'i' and 'j' */ |
| 85 } | 85 } |
| 86 | 86 |
| 87 </style> | 87 </style> |
| 88 <script src="../../resources/js-test.js"></script> | 88 <script src="../../resources/js-test.js"></script> |
| 89 </head> | 89 </head> |
| 90 <body> | 90 <body> |
| 91 <div id="description"></div> | 91 <div id="description"></div> |
| 92 <div id="tests"></div> | 92 <div id="tests"></div> |
| 93 | 93 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 createAndAppendSpan(refId, subTestId, refFontFamily); | 136 createAndAppendSpan(refId, subTestId, refFontFamily); |
| 137 | 137 |
| 138 shouldBe("document.getElementById('" + testId + "').offsetWidth", "docum
ent.getElementById('" + refId + "').offsetWidth"); | 138 shouldBe("document.getElementById('" + testId + "').offsetWidth", "docum
ent.getElementById('" + refId + "').offsetWidth"); |
| 139 } | 139 } |
| 140 testsElement.appendChild(document.createElement("br")); | 140 testsElement.appendChild(document.createElement("br")); |
| 141 } | 141 } |
| 142 </script> | 142 </script> |
| 143 </body> | 143 </body> |
| 144 </html> | 144 </html> |
| 145 | 145 |
| OLD | NEW |