Title: [199613] trunk/LayoutTests
Revision
199613
Author
[email protected]
Date
2016-04-15 15:24:36 -0700 (Fri, 15 Apr 2016)

Log Message

[Font Loading] Test promise gets rejected when unknown format used
https://bugs.webkit.org/show_bug.cgi?id=156643

Reviewed by Simon Fraser.

When all the sources have an unknown format, the promise should be rejected.

* fast/text/font-face-_javascript_-expected.txt:
* fast/text/font-face-_javascript_.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199612 => 199613)


--- trunk/LayoutTests/ChangeLog	2016-04-15 22:23:44 UTC (rev 199612)
+++ trunk/LayoutTests/ChangeLog	2016-04-15 22:24:36 UTC (rev 199613)
@@ -1,3 +1,15 @@
+2016-04-15  Myles C. Maxfield  <[email protected]>
+
+        [Font Loading] Test promise gets rejected when unknown format used
+        https://bugs.webkit.org/show_bug.cgi?id=156643
+
+        Reviewed by Simon Fraser.
+
+        When all the sources have an unknown format, the promise should be rejected.
+
+        * fast/text/font-face-_javascript_-expected.txt:
+        * fast/text/font-face-_javascript_.html:
+
 2016-04-15  Daniel Bates  <[email protected]>
 
         CSP: Ignore paths in CSP matching after redirects

Modified: trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt (199612 => 199613)


--- trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt	2016-04-15 22:23:44 UTC (rev 199612)
+++ trunk/LayoutTests/fast/text/font-face-_javascript_-expected.txt	2016-04-15 22:24:36 UTC (rev 199613)
@@ -48,6 +48,7 @@
 PASS newFontFace.status is "loaded"
 PASS newFontFace is oldFontFace
 PASS newFontFace.status is "loaded"
+PASS oldFontFace.code is oldFontFace.NETWORK_ERR
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/text/font-face-_javascript_.html (199612 => 199613)


--- trunk/LayoutTests/fast/text/font-face-_javascript_.html	2016-04-15 22:23:44 UTC (rev 199612)
+++ trunk/LayoutTests/fast/text/font-face-_javascript_.html	2016-04-15 22:24:36 UTC (rev 199613)
@@ -104,10 +104,17 @@
     newFontFace = x;
     shouldBe("newFontFace", "oldFontFace");
     shouldBeEqualToString("newFontFace.status", "loaded");
-    finishJSTest();
+    return (new FontFace('family_name2', 'url(\'../../resources/Ahem.ttf\') format(\'garbage\')', {})).load()
 }, function(y) {
     testFailed("Legit URL should load");
     finishJSTest();
+}).then(function() {
+    testFailed("Unknown format should not load successfully.");
+    finishJSTest();
+}, function(y) {
+    oldFontFace = y;
+    shouldBe("oldFontFace.code", "oldFontFace.NETWORK_ERR");
+    finishJSTest();
 });
 
 </script>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to