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

Side by Side Diff: LayoutTests/http/tests/css/resource-timing-details-for-revalidation.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 <script src="/js-test-resources/js-test.js"></script> 2 <script src="/js-test-resources/js-test.js"></script>
3 <style> 3 <style>
4 @font-face { 4 @font-face {
5 font-family: ahem; 5 font-family: ahem;
6 src: url(http://localhost:8080/css/resources/cors-ahem.php); 6 src: url(http://localhost:8080/css/resources/cors-ahem.php);
7 } 7 }
8 </style> 8 </style>
9 9
10 <div style="font-family: ahem;">This fetches ahem font.<div> 10 <div style="font-family: ahem;">This fetches ahem font.<div>
11 11
12 <script> 12 <script>
13 if (window.testRunner) 13 if (window.testRunner)
14 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
15 15
16 var entry; 16 var entry;
17 if (location.hash == '#check') { 17 if (location.hash == '#check') {
18 document.fonts.ready().then(function() { 18 document.fonts.ready.then(function() {
19 setTimeout(function() { 19 setTimeout(function() {
20 entry = performance.getEntriesByName('http://localhost:8080/css/reso urces/cors-ahem.php')[0]; 20 entry = performance.getEntriesByName('http://localhost:8080/css/reso urces/cors-ahem.php')[0];
21 shouldBeTrue('entry.domainLookupStart > 0'); 21 shouldBeTrue('entry.domainLookupStart > 0');
22 if (window.testRunner) 22 if (window.testRunner)
23 testRunner.notifyDone(); 23 testRunner.notifyDone();
24 }, 10); 24 }, 10);
25 }); 25 });
26 } else { 26 } else {
27 document.fonts.ready().then(function() { 27 document.fonts.ready.then(function() {
28 setTimeout(function() { 28 setTimeout(function() {
29 location.hash = 'check'; 29 location.hash = 'check';
30 location.reload(); 30 location.reload();
31 }, 10); 31 }, 10);
32 }); 32 });
33 } 33 }
34 </script> 34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698