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

Unified Diff: LayoutTests/fast/css/resource-timing-for-unloaded-font.html

Issue 355973002: Unloaded web fonts should not report Resource Timing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix cache-hit-resource-timing-buffer-full-crash.html on mac Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/fast/css/resource-timing-for-unloaded-font-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/resource-timing-for-unloaded-font.html
diff --git a/LayoutTests/fast/css/resource-timing-for-unloaded-font.html b/LayoutTests/fast/css/resource-timing-for-unloaded-font.html
new file mode 100644
index 0000000000000000000000000000000000000000..16d3fefdecdbf0a3453818c8cb5e311ef562113e
--- /dev/null
+++ b/LayoutTests/fast/css/resource-timing-for-unloaded-font.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<style>
+@font-face {
+ font-family: foo;
+ src: url(file:///foo.ttf);
bashi 2014/06/27 01:40:51 nit: it would be clearer if you name it as no-such
Kunihiko Sakamoto 2014/06/27 02:14:57 Done.
+}
+</style>
+
+<script>
+description('Unloaded web fonts should not report Resource Timing')
bashi 2014/06/27 01:40:51 nit: missing semicolon.
Kunihiko Sakamoto 2014/06/27 02:14:57 Done.
+
+window.jsTestIsAsync = true;
+
+function getDocumentFontFaces() {
+ var faces = [];
+ document.fonts.forEach(function(face) { faces.push(face); });
+ return faces;
+}
+
+function verify() {
+ shouldBeEqualToString('getDocumentFontFaces()[0].status', 'unloaded');
+ entries = performance.getEntriesByName('file:///foo.ttf');
+ shouldBe('entries.length', '0');
+ finishJSTest();
+}
+
+if (location.hash == '#check') {
+ setTimeout(verify, 10);
+} else {
+ location.hash = 'check';
+ location.reload();
+}
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/resource-timing-for-unloaded-font-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698