OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 window.enablePixelTesting = true; | 4 window.enablePixelTesting = true; |
5 </script> | 5 </script> |
6 <script src="../../js-test-resources/js-test.js"></script> | 6 <script src="../../js-test-resources/js-test.js"></script> |
7 <script src="../../forms-test-resources/picker-common.js"></script> | 7 <script src="../../forms-test-resources/picker-common.js"></script> |
8 <style> | 8 <style> |
9 @font-face { | 9 @font-face { |
10 font-family: 'TestFont'; | 10 font-family: 'TestFont'; |
11 src: url(slow-ahem-loading.cgi); | 11 src: url(slow-ahem-loading.cgi); |
12 } | 12 } |
13 option { | 13 option { |
14 font-family: TestFont; | 14 font-family: TestFont; |
15 } | 15 } |
16 </style> | 16 </style> |
17 <select id="menu"> | 17 <select id="menu"> |
18 <option>foo</option> | 18 <option>foo</option> |
19 <option>bar</option> | 19 <option>bar</option> |
20 </select> | 20 </select> |
| 21 <p id="description"></p> |
| 22 <div id="console"></div> |
21 <script> | 23 <script> |
22 description('Test that fonts loaded after a popup menu is opened triggers a styl
e recalc.'); | 24 description('Test that fonts loaded after a popup menu is opened triggers a styl
e recalc.'); |
23 | 25 |
24 document.fonts.ready.then(onFontsReady); | 26 document.fonts.ready.then(onFontsReady); |
25 | 27 |
26 openPicker(menu, function() {}, function () { | 28 openPicker(menu, function() {}, function () { |
27 // Note that we don't need to call finishJSTest() here because the font | 29 // Note that we don't need to call finishJSTest() here because the font |
28 // promise will still be resolved. | 30 // promise will still be resolved. |
29 testFailed('picker didn\'t open') | 31 testFailed('picker didn\'t open') |
30 }); | 32 }); |
31 | 33 |
32 function onFontsReady() { | 34 function onFontsReady() { |
33 finishJSTest(); | 35 finishJSTest(); |
34 } | 36 } |
35 </script> | 37 </script> |
36 </head> | 38 </head> |
37 <body> | 39 <body> |
38 </body> | 40 </body> |
39 </html> | 41 </html> |
OLD | NEW |