Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <style></style> | |
| 3 <div id="container"></div> | |
| 4 <script> | |
| 5 // Regression test for https://crbug.com/655076. Test passes by not crashing in | |
| 6 // debug build. | |
| 7 | |
| 8 if (window.testRunner) { | |
| 9 testRunner.waitUntilDone(); | |
| 10 setTimeout(() => { | |
| 11 testRunner.notifyDone(); | |
| 12 }, 5000); | |
|
Kunihiko Sakamoto
2016/10/13 05:55:19
5000ms is the same as slow-ahem-loading.cgi delay
Shao-Chuan Lee
2016/10/13 06:12:58
It always crashes when the second span is rendered
Kunihiko Sakamoto
2016/10/13 06:36:18
But resulting document may be different depending
Shao-Chuan Lee
2016/10/13 07:14:06
I see. I think it's better to make this test text-
| |
| 13 } | |
| 14 | |
| 15 let container = document.getElementById('container'); | |
| 16 let font = 'slow-ahem-loading.cgi?delay=5000'; | |
| 17 | |
| 18 function makeSpan(family) { | |
| 19 document.styleSheets[0].insertRule( | |
| 20 '@font-face { font-family: ' + family + '; src: url(' + font + '); }', 0); | |
| 21 let span = document.createElement('span'); | |
| 22 span.style.fontFamily = family; | |
| 23 span.textContent = 'test'; | |
| 24 container.appendChild(span); | |
| 25 } | |
| 26 | |
| 27 window.onload = function() { | |
| 28 makeSpan('ahem-1'); | |
| 29 setTimeout(() => { makeSpan('ahem-2'); }, 4000); | |
| 30 | |
| 31 }; | |
| 32 </script> | |
| OLD | NEW |