| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body> | |
| This test makes sure that drawing a system fallback font to canvas doesn't crash any process. The test passes if there is no crash. | |
| <canvas id="canvas" width="400" height="400"></canvas> | |
| <script> | |
| if (window.testRunner) | |
| testRunner.dumpAsText(); | |
| let canvas = document.getElementById("canvas"); | |
| let context = canvas.getContext("2d"); | |
| context.font = "bold 36px system-ui"; | |
| context.fillText("苹果电脑", 100, 100); | |
| </script> | |
| </body> | |
| </html> |