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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/webfont/resources/font-load-revalidation-frame.html

Issue 1893233002: WebFonts: reset m_loadLimitState on memory cache revalidation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address hiroshige's comments at #11 Created 4 years, 8 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/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>

Powered by Google App Engine
This is Rietveld 408576698