Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/webfont/crbug-655076.html | 
| diff --git a/third_party/WebKit/LayoutTests/http/tests/webfont/crbug-655076.html b/third_party/WebKit/LayoutTests/http/tests/webfont/crbug-655076.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..1e5682135a4c1d198eda6391b2664ec8d1aa62a2 | 
| --- /dev/null | 
| +++ b/third_party/WebKit/LayoutTests/http/tests/webfont/crbug-655076.html | 
| @@ -0,0 +1,32 @@ | 
| +<!DOCTYPE html> | 
| +<style></style> | 
| +<div id="container"></div> | 
| +<script> | 
| +// Regression test for https://crbug.com/655076. Test passes by not crashing in | 
| +// debug build. | 
| + | 
| +if (window.testRunner) { | 
| + testRunner.waitUntilDone(); | 
| + setTimeout(() => { | 
| + testRunner.notifyDone(); | 
| + }, 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-
 
 | 
| +} | 
| + | 
| +let container = document.getElementById('container'); | 
| +let font = 'slow-ahem-loading.cgi?delay=5000'; | 
| + | 
| +function makeSpan(family) { | 
| + document.styleSheets[0].insertRule( | 
| + '@font-face { font-family: ' + family + '; src: url(' + font + '); }', 0); | 
| + let span = document.createElement('span'); | 
| + span.style.fontFamily = family; | 
| + span.textContent = 'test'; | 
| + container.appendChild(span); | 
| +} | 
| + | 
| +window.onload = function() { | 
| + makeSpan('ahem-1'); | 
| + setTimeout(() => { makeSpan('ahem-2'); }, 4000); | 
| + | 
| +}; | 
| +</script> |