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

Side by Side 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: #14 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <body>
4 <div>font loading revalidation test</div>
5 <script>
6 // Try to cover the case FontResource is reused even after
7 // frame.location.reload(). So that memory cache performs revalidation,
8 // The URL should not have a query like .cgi?delay=100, and HTTP response
9 // should have at least either Last-modified or Etag header.
10 var font = new FontFace('Foo', 'url(../cachable-slow-ahem-loading.cgi)', {});
11 var startTime = performance.now();
12 font.load();
13 font.loaded.then(() => {
14 var loadTime = performance.now() - startTime;
15 parent.postMessage('pass:font.load()', '*');
16 var testName = 'loadTime > 900';
17 var testResult = loadTime > 900 ? 'pass' : 'fail';
18 parent.postMessage([testResult, testName].join(':'), '*');
19 parent.postMessage('reload', '*');
20 }, () => {
21 parent.postMessage('fail:font.load()', '*');
22 });
23 </script>
24 </body>
25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698