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

Side by Side Diff: LayoutTests/http/tests/webfont/fontface-style-change.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 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <style id="target"> 4 <style id="target">
5 @font-face { 5 @font-face {
6 font-family: TestFont; 6 font-family: TestFont;
7 src: local(nonexistent), url(slow-ahem-loading.cgi); 7 src: local(nonexistent), url(slow-ahem-loading.cgi);
8 } 8 }
9 </style> 9 </style>
10 <span id="testSpan">A</span> 10 <span id="testSpan">A</span>
11 <script> 11 <script>
12 if (window.testRunner) 12 if (window.testRunner)
13 testRunner.waitUntilDone(); 13 testRunner.waitUntilDone();
14 14
15 // Set the span's style and register a font ready listener in the same microtask so that font can't 15 // Set the span's style and register a font ready listener in the same microtask so that font can't
16 // load before we've had a chance to register the listener. 16 // load before we've had a chance to register the listener.
17 document.getElementById('testSpan').style.fontFamily = "TestFont"; 17 document.getElementById('testSpan').style.fontFamily = "TestFont";
18 18
19 if (window.testRunner) 19 if (window.testRunner)
20 document.fonts.ready().then(function() { testRunner.notifyDone(); }); 20 document.fonts.ready.then(function() { testRunner.notifyDone(); });
21 21
22 var style = document.getElementById('target'); 22 var style = document.getElementById('target');
23 style.parentNode.removeChild(style); 23 style.parentNode.removeChild(style);
24 document.body.offsetLeft; 24 document.body.offsetLeft;
25 document.body.appendChild(style); 25 document.body.appendChild(style);
26 </script> 26 </script>
27 </body> 27 </body>
28 </html> 28 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698