Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash.html

Issue 1832333003: (1) Finish font subresource loading of SVG synchronously in SVGImage::dataChanged() Base URL: https://chromium.googlesource.com/chromium/src.git@SVG_new2_0
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash.html
diff --git a/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash.html b/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash.html
new file mode 100644
index 0000000000000000000000000000000000000000..009b1378765314bb7b2a043d29bbb678520e3215
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash.html
@@ -0,0 +1,26 @@
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+<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.svg" id="img" onload="debug('onload of img'); doTest()">
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/as-image/data-font-in-css-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698