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

Side by Side Diff: LayoutTests/fast/css/fontfaceset-multiple-faces.html

Issue 816923002: Switch FontFaceSet#ready from a method to an attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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
OLDNEW
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: TestFont; 6 font-family: TestFont;
7 src: local('Courier New'); 7 src: local('Courier New');
8 } 8 }
9 9
10 @font-face { 10 @font-face {
11 font-family: TestFont; 11 font-family: TestFont;
12 src: url(../../resources/Ahem.ttf); 12 src: url(../../resources/Ahem.ttf);
13 unicode-range: u+61-7a; /* 'a'-'z' */ 13 unicode-range: u+61-7a; /* 'a'-'z' */
14 } 14 }
15 </style> 15 </style>
16 <script> 16 <script>
17 description('Test load events for a font family consists of multiple @font-faces .'); 17 description('Test load events for a font family consists of multiple @font-faces .');
18 18
19 window.jsTestIsAsync = true; 19 window.jsTestIsAsync = true;
20 20
21 function runTests() { 21 function runTests() {
22 document.fonts.addEventListener('loading', onLoading); 22 document.fonts.addEventListener('loading', onLoading);
23 document.fonts.addEventListener('loadingdone', onLoadingDone); 23 document.fonts.addEventListener('loadingdone', onLoadingDone);
24 document.fonts.ready().then(finish); 24 document.fonts.ready.then(finish);
25 25
26 document.fonts.load('10px TestFont', 'abc'); 26 document.fonts.load('10px TestFont', 'abc');
27 } 27 }
28 28
29 var event; 29 var event;
30 var firedEvents = []; 30 var firedEvents = [];
31 31
32 function onLoading(e) { 32 function onLoading(e) {
33 firedEvents.push(e.type); 33 firedEvents.push(e.type);
34 } 34 }
(...skipping 20 matching lines...) Expand all
55 runTests(); 55 runTests();
56 else { 56 else {
57 testFailed('document.fonts does not exist'); 57 testFailed('document.fonts does not exist');
58 finishJSTest(); 58 finishJSTest();
59 } 59 }
60 </script> 60 </script>
61 </head> 61 </head>
62 <body> 62 <body>
63 </body> 63 </body>
64 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698