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

Side by Side Diff: LayoutTests/fast/css/fontloader-download-error.html

Issue 23717059: [Font Load Events] Implement FontFaceSet methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../js/resources/js-test-pre.js"></script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 <style> 4 <style>
5 /* Test 1: Invalid font data */ 5 /* Test 1: Invalid font data */
6 @font-face { 6 @font-face {
7 font-family: myfont1; 7 font-family: myfont1;
8 src: url('resources/invalidfont.png') format(opentype); 8 src: url('resources/invalidfont.png') format(opentype);
9 } 9 }
10 10
(...skipping 23 matching lines...) Expand all
34 </style> 34 </style>
35 <script> 35 <script>
36 description('Test download error cases.'); 36 description('Test download error cases.');
37 37
38 window.jsTestIsAsync = true; 38 window.jsTestIsAsync = true;
39 39
40 function runTests() { 40 function runTests() {
41 document.fonts.addEventListener('loading', onLoading); 41 document.fonts.addEventListener('loading', onLoading);
42 document.fonts.addEventListener('loadingdone', onLoadingDone); 42 document.fonts.addEventListener('loadingdone', onLoadingDone);
43 document.fonts.addEventListener('loadingerror', onLoadingError); 43 document.fonts.addEventListener('loadingerror', onLoadingError);
44 document.fonts.notifyWhenFontsReady(finish); 44 document.fonts.ready().then(finish);
45 } 45 }
46 46
47 var event; 47 var event;
48 var firedEvents = []; 48 var firedEvents = [];
49 49
50 function onLoading(e) { 50 function onLoading(e) {
51 firedEvents.push(e.type); 51 firedEvents.push(e.type);
52 } 52 }
53 53
54 function onLoadingDone(e) { 54 function onLoadingDone(e) {
(...skipping 26 matching lines...) Expand all
81 </head> 81 </head>
82 <body> 82 <body>
83 <div style="font-family: myfont1">font1</div> 83 <div style="font-family: myfont1">font1</div>
84 <div style="font-family: myfont2">font2</div> 84 <div style="font-family: myfont2">font2</div>
85 <div style="font-family: myfont3">font3</div> 85 <div style="font-family: myfont3">font3</div>
86 <div style="font-family: myfont4">font4</div> 86 <div style="font-family: myfont4">font4</div>
87 <div style="font-family: myfont5">font5</div> 87 <div style="font-family: myfont5">font5</div>
88 <script src="../js/resources/js-test-post.js"></script> 88 <script src="../js/resources/js-test-post.js"></script>
89 </body> 89 </body>
90 </html> 90 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/fontloader-css-change-in-callback.html ('k') | LayoutTests/fast/css/fontloader-events.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698