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

Unified Diff: LayoutTests/http/tests/webfont/slow-loading.html

Issue 171823002: Make text visible when font loading takes longer than 3 seconds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 10 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: LayoutTests/http/tests/webfont/slow-loading.html
diff --git a/LayoutTests/http/tests/webfont/slow-loading.html b/LayoutTests/http/tests/webfont/slow-loading.html
new file mode 100644
index 0000000000000000000000000000000000000000..d5dd05725040301f8b354d8cbe7ed5314efddf42
--- /dev/null
+++ b/LayoutTests/http/tests/webfont/slow-loading.html
@@ -0,0 +1,74 @@
+<html>
+<head>
+<style>
+@font-face {
+ font-family:ahem-4sec;
+ src: url(slow-ahem-loading.cgi?delay=4000);
+}
+@font-face {
+ font-family:ahem-8sec;
+ src: url(slow-ahem-loading.cgi?delay=8000);
+}
+@font-face {
+ font-family:ahem-5sec;
+ src: url(slow-ahem-loading.cgi?delay=5000);
+}
+.testspan {
+ font-size:64px;
+ border: 1px solid;
+}
+#span1 {
+ font-family: ahem-4sec, Arial;
+}
+#span2 {
+ font-family: ahem-8sec, Arial;
+}
+#span3 {
+ font-family: ahem-5sec, Arial;
+}
+</style>
+</head>
+<body>
+
+Ahem after 5 seconds:
+<br/>
+<span class="testspan" id="span1" style="display: none;">
+abcdefg
+</span>
+<br/>
+
+Arial after 5 seconds:
+<br/>
+<span class="testspan" id="span2" style="display: none;">
+abcdefg
+</span>
+<br/>
+
+Blank after 5 seconds:
+<br/>
+<span class="testspan" id="span3" style="display: none;">
+abcdefg
+</span>
+<br/>
+
+<script>
+
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+function displayElementAfter(id, msec) {
+ setTimeout(function() {
+ document.getElementById(id).style.removeProperty("display");
+ }, msec);
+}
+
+window.onload = function() {
+ displayElementAfter("span1", 0);
+ displayElementAfter("span2", 0);
+ displayElementAfter("span3", 3000);
+ setTimeout(function() { if (window.testRunner) testRunner.notifyDone(); }, 5000);
+};
+
+</script>
+</body>
+</html>
« no previous file with comments | « LayoutTests/http/tests/webfont/slow-ahem-loading.cgi ('k') | LayoutTests/http/tests/webfont/slow-loading-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698