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

Side by Side Diff: LayoutTests/fast/css/fontfaceset-multiple-families.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: TestFont1; 6 font-family: TestFont1;
7 src: local('Courier New'); 7 src: local('Courier New');
8 } 8 }
9 9
10 @font-face { 10 @font-face {
(...skipping 14 matching lines...) Expand all
25 </style> 25 </style>
26 <script> 26 <script>
27 description('Test load events for fonts.loadFont() with multiple font families.' ); 27 description('Test load events for fonts.loadFont() with multiple font families.' );
28 28
29 window.jsTestIsAsync = true; 29 window.jsTestIsAsync = true;
30 30
31 function runTests() { 31 function runTests() {
32 document.fonts.addEventListener('loading', onLoading); 32 document.fonts.addEventListener('loading', onLoading);
33 document.fonts.addEventListener('loadingdone', onLoadingDone); 33 document.fonts.addEventListener('loadingdone', onLoadingDone);
34 document.fonts.addEventListener('loadingerror', onLoadingError); 34 document.fonts.addEventListener('loadingerror', onLoadingError);
35 document.fonts.ready().then(finish); 35 document.fonts.ready.then(finish);
36 36
37 document.fonts.load('10px TestFont1, TestFont2, TestFont3, TestFont4', 'abc' ).catch(function() {}); 37 document.fonts.load('10px TestFont1, TestFont2, TestFont3, TestFont4', 'abc' ).catch(function() {});
38 } 38 }
39 39
40 var event; 40 var event;
41 var firedEvents = []; 41 var firedEvents = [];
42 42
43 function onLoading(e) { 43 function onLoading(e) {
44 firedEvents.push(e.type); 44 firedEvents.push(e.type);
45 } 45 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 runTests(); 81 runTests();
82 else { 82 else {
83 testFailed('document.fonts does not exist'); 83 testFailed('document.fonts does not exist');
84 finishJSTest(); 84 finishJSTest();
85 } 85 }
86 </script> 86 </script>
87 </head> 87 </head>
88 <body> 88 <body>
89 </body> 89 </body>
90 </html> 90 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698