Index: third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-invalid-font-crash.html |
diff --git a/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-invalid-font-crash.html b/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-invalid-font-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b24e0f692e4cfc394e28a058240fe2da30c8330d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-invalid-font-crash.html |
@@ -0,0 +1,26 @@ |
+<html> |
fs
2017/03/15 14:22:16
Ditto.
hiroshige
2017/05/04 22:50:50
Done.
|
+<head> |
+<script src="../../resources/js-test.js"></script> |
fs
2017/03/15 14:22:16
Ditto.
hiroshige
2017/05/04 22:50:50
Done.
|
+<script> |
+description("Test that loading of SVG that contains a font data URL completes before <img> and <body> onload handler is called, and thus doesn't cause assertion failure."); |
+jsTestIsAsync = true; |
+ |
+var count = 0; |
+function doTest() { |
+ var svg = document.getElementById('img'); |
+ var canvas = document.createElement("canvas"); |
+ var ctx = canvas.getContext("2d"); |
+ ctx.drawImage(svg, 0, 0); |
+ |
+ // Test finishes when both <body> and <img>'s onload() are called. |
+ ++count; |
+ if (count == 2) { |
+ finishJSTest(); |
+ } |
+} |
+</script> |
+</head> |
+<body onload="debug('onload of body'); doTest()"> |
+<img src="resources/data-font-in-css-invalid-font.svg" id="img" onload="debug('onload of img'); doTest()"> |
+</body> |
+</html> |