blob: ec39301635bf0a04279fd4b96cb40f9834fe7093 [file] [log] [blame]
tyler_w@apple.com93e4dfe2022-03-05 02:03:49 +00001<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2<html>
3<head>
4<script src="../resources/js-test.js"></script>
5<style>
6@font-face {
7 font-family: 'Litherum';
8 src: url("resources/Litherum.svg") format(svg);
9}
10* { font-family: 'Litherum'; }
11</style>
12</head>
13<body onload="runTest()">
14
15<input type="text" id="textfield" value="some word"></input>
16
17<script>
18 var output = "This test ensures that we don't crash when applying a custom SVG font to attributed strings.\n";
19
20 if (window.accessibilityController)
21 window.jsTestIsAsync = true;
22
23 function runTest() {
24 if (window.accessibilityController) {
25 const textField = accessibilityController.accessibleElementById("textfield");
26 output += `Getting attributed string for range (0, 9)\n`;
27 const attributedString = textField.attributedStringForRange(0, 9);
28 output += "PASS: Didn't crash.\n";
29 debug(output);
30 finishJSTest();
31 }
32 }
33</script>
34</body>
35</html>