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

Unified Diff: LayoutTests/http/tests/webfont/fontloader-loading-attribute.html

Issue 23717059: [Font Load Events] Implement FontFaceSet methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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: LayoutTests/http/tests/webfont/fontloader-loading-attribute.html
diff --git a/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html b/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html
index 6dca7b5896b9e17491c8978ec433b0a05a68f97b..7e1a62dc72d7d54ff52d098cf967178844106aef 100644
--- a/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html
+++ b/LayoutTests/http/tests/webfont/fontloader-loading-attribute.html
@@ -8,25 +8,25 @@
}
</style>
<script>
-description('Test for FontFaceSet.loading attribute');
+description('Test for FontFaceSet.status attribute');
window.jsTestIsAsync = true;
function runTests() {
- shouldBe("document.fonts.checkFont('10px TestFont')", "false");
- shouldBe("document.fonts.loading", "false");
- document.fonts.loadFont({ font: '10px TestFont', onsuccess: onsuccess });
- shouldBe("document.fonts.loading", "true");
+ shouldBeFalse("document.fonts.check('10px TestFont')");
+ shouldBeEqualToString("document.fonts.status", "loaded");
+ document.fonts.load('10px TestFont').then(onsuccess);
+ shouldBeEqualToString("document.fonts.status", "loading");
}
function onsuccess() {
- shouldBe("document.fonts.checkFont('10px TestFont')", "true");
- shouldBe("document.fonts.loading", "true");
- document.fonts.notifyWhenFontsReady(onFontsReady);
+ shouldBeTrue("document.fonts.check('10px TestFont')");
+ shouldBeEqualToString("document.fonts.status", "loaded");
+ document.fonts.ready().then(onFontsReady);
}
function onFontsReady() {
- shouldBe("document.fonts.loading", "false");
+ shouldBeEqualToString("document.fonts.status", "loaded");
finishJSTest();
}

Powered by Google App Engine
This is Rietveld 408576698