Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/http/tests/webfont/resources/font-load-revalidation-frame.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/webfont/resources/font-load-revalidation-frame.html b/third_party/WebKit/LayoutTests/http/tests/webfont/resources/font-load-revalidation-frame.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fee231d0212d88b99449ca93896bcbd6406f2930 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/http/tests/webfont/resources/font-load-revalidation-frame.html |
| @@ -0,0 +1,25 @@ |
| +<!doctype html> |
| +<html> |
| +<body> |
| +<div>font loading revalidation test</div> |
| +<script> |
| +// Try to cover the case FontResource is reused even after |
| +// frame.location.reload(). So that memory cache performs revalidation, |
| +// The URL should not have a query like .cgi?delay=100, and HTTP response |
| +// should have at least either Last-modified or Etag header. |
| +var font = new FontFace('Foo', 'url(../cachable-slow-ahem-loading.cgi)', {}); |
| +var startTime = performance.now(); |
| +font.load(); |
| +font.loaded.then(() => { |
| + var loadTime = performance.now() - startTime; |
| + parent.postMessage('pass:font.load()', '*'); |
|
hiroshige
2016/04/21 07:39:10
We don't have lines |PASS font.load()| in -expecte
Takashi Toyoshima
2016/04/21 08:31:25
Oops, good point. I forget to update the expectati
|
| + var testName = 'loadTime > 900'; |
| + var testResult = loadTime > 900 ? 'pass' : 'fail'; |
| + parent.postMessage([testResult, testName].join(':'), '*'); |
| + parent.postMessage('reload', '*'); |
| +}, () => { |
| + parent.postMessage('fail:font.load()', '*'); |
| +}); |
| +</script> |
| +</body> |
| +</html> |