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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/css-font-display/font-display.html

Issue 2895123002: Convert CSS font-display test to wpt (Closed)
Patch Set: rebase, update network service expectation Created 3 years, 7 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/external/wpt/css-font-display/font-display.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html b/third_party/WebKit/LayoutTests/external/wpt/css-font-display/font-display.html
similarity index 88%
rename from third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
rename to third_party/WebKit/LayoutTests/external/wpt/css-font-display/font-display.html
index ec19d7a86ef0c52ef1966b622bc97d8808bc31a6..019a88a9b7cf5fda127a5e7371384eda8995314e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/webfont/font-display.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css-font-display/font-display.html
@@ -1,5 +1,7 @@
<!DOCTYPE html>
+<html class="reftest-wait">
<title>Test for font-display @font-face descriptor</title>
+<link rel="match" href="font-display-ref.html">
<style>
.hidden { display: none; }
</style>
@@ -16,9 +18,6 @@
</tr>
</table>
<script>
-if (window.testRunner)
- testRunner.waitUntilDone();
-
var fontDisplayValues = ['auto', 'block', 'swap', 'fallback', 'optional'];
var configs = [{time: 0, delay: 1000},
{time: 1000, delay: 0},
@@ -29,9 +28,7 @@ var configs = [{time: 0, delay: 1000},
{time: 5000, delay: 8000}];
function makeFontFaceDeclaration(family, config, display) {
- var url = '/resources/Ahem.ttf';
- if (config.delay > 0)
- url = 'slow-ahem-loading.cgi?delay=' + config.delay + '&t=' + config.time;
+ url = 'resources/slow-ahem-loading.py?ms=' + config.delay;
return '@font-face { font-family: ' + family + '; src: url(' + url + '); font-display: ' + display + '; }';
}
@@ -63,8 +60,7 @@ window.onload = function() {
if (config.time == 0) {
setTimeout((function(tr){
tr.classList.remove('hidden');
- if (window.testRunner)
- testRunner.notifyDone();
+ document.documentElement.classList.remove("reftest-wait");
}).bind(null, tr), maxTime);
} else {
setTimeout((function(tr){tr.classList.remove('hidden')}).bind(null, tr), maxTime - config.time);
@@ -73,3 +69,4 @@ window.onload = function() {
}
</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698