[Font Loading] Crash when a single load request causes multiple fonts to fail loading
[WebKit-https.git] / LayoutTests / fast / text / font-face-set-document-multiple-failure.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 <style>
6 @font-face {
7         font-family: "WebFont";
8         src: url("garbage");
9 }
10 @font-face {
11         font-family: "WebFont";
12         src: url("garbage");
13         font-variant: small-caps;
14 }
15 </style>
16 </head>
17 <body>
18 <script>
19 self.jsTestIsAsync = true;
20 var globalX;
21 document.fonts.load("16px WebFont").then(function() {
22     testFailed("Bogus URLs should not load");
23     finishJSTest();
24 }, function(x) {
25         globalX = x;
26     shouldBe("globalX.code", "globalX.NETWORK_ERR");
27     finishJSTest();
28 })
29 </script>
30 <script src="../../resources/js-test-post.js"></script>
31 </body>
32 </html>