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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/webfont/crbug-655076.html

Issue 2419753002: Prevent FontResource load limit timers from restarting during loading (Closed)
Patch Set: Created 4 years, 2 months 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
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698