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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html

Issue 2722493002: FontFaceSet.ready should not be resolved if there's pending layouts (Closed)
Patch Set: add comments Created 3 years, 10 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 | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html
index c55b7f3c4e7776f40143a4f02d16a9d7e9286889..479f6778fa62968ad1054d641b58a5572e875fb7 100644
--- a/third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html
+++ b/third_party/WebKit/LayoutTests/fast/css/fontfaceset-ready.html
@@ -2,6 +2,7 @@
<title>FontFaceSet.ready attribute</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
+<div style="font-family: ahem">A</div>
<script>
promise_test(function(t) {
@@ -36,4 +37,16 @@ promise_test(function(t) {
});
}, 'FontFaceSet.ready attribute');
+promise_test(function(t) {
+ var face = new FontFace('ahem', 'url(../../resources/Ahem.ttf)');
+
+ return document.fonts.ready
+ .then(function(fonts) {
+ document.fonts.add(face);
+ return document.fonts.ready;
+ }).then(function(fonts) {
+ assert_equals(face.status, 'loaded');
+ });
+}, 'FontFaceSet.ready should be resolved after layout operations which may cause font loads.');
+
</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | third_party/WebKit/Source/core/css/FontFaceSet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698