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

Unified 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698