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

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

Issue 2613853002: Phase III Step 2: Call imageNotifyFinished() and image load event after SVG loading completes (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script>
5 var t1 = async_test("Loading of SVG with a invalid font completes " +
6 "before <img> load event and drawImage() doesn't crash.");
7
8 var imgOnLoadCalled = false;
9
10 var imgOnLoad = t1.step_func(function() {
11 imgOnLoadCalled = true;
12
13 var svg = document.getElementById('img');
14 var canvas = document.createElement("canvas");
15 var ctx = canvas.getContext("2d");
16 ctx.drawImage(svg, 0, 0);
17 });
18
19 var bodyOnLoad = t1.step_func_done(function() {
20 assert_true(imgOnLoadCalled,
21 "<img> load event must be fired before <body> load event");
22 });
23 </script>
24 <body onload="bodyOnLoad()">
25 <img src="resources/data-font-in-css-invalid-font.svg" id="img" onload="imgOnLoa d()">
26 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698