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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html

Issue 1901153002: Implement createImageBitmap(SVG) of intrinsic size = 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/fast/canvas/resources/zeroSize.svg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html
index b6f756b0ff2226c2bc06193d36238e74e1192ed8..fb8f5ecd12284939128415c5a835c53940682fbc 100644
--- a/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-createImageBitmap-svg-no-intrinsic-size.html
@@ -9,18 +9,37 @@
description("Test createImageBitmap from a SVG image without intrinsic size.");
window.jsTestIsAsync = true;
-var image = new Image();
-image.onload = function() {
- createImageBitmap(image).then(function(imageBitmap) {
- testFailed("createImageBitmap promise resolved, expected to be rejected");
- finishJSTest();
- }, function (e) {
- testPassed("createImageBitmap promise rejected: " + e);
- finishJSTest();
- });
+var image1Loaded = false;
+var image2Loaded = false;
+var image1 = new Image();
+var image2 = new Image();
+/*image1.onload = function() {
+ image1Loaded = true;
+ testCreateImageBitmap();
+}
+image1.src = '../../svg/hixie/intrinsic/resources/003.svg';
+*/
+image2.onload = function() {
+ console.log("image2 loaded");
xidachen 2016/04/19 16:52:03 The test doesn't even get to this point.
davve 2016/04/19 19:31:47 Oh, right. Such an image probably has Image::isNul
davve 2016/04/21 09:50:48 If you see value in getting around this issue, cha
+ image2Loaded = true;
+ testCreateImageBitmap();
}
-image.src = '../../svg/hixie/intrinsic/resources/003.svg';
+image2.src = 'resources/zeroSize.svg';
+function testCreateImageBitmap()
+{
+ if (image2Loaded) {
+ //if (image1Loaded && image2Loaded) {
+ finishJSTest();
+ /*createImageBitmap(image1).then(function(imageBitmap) {
+ testFailed("createImageBitmap promise resolved, expected to be rejected");
+ finishJSTest();
+ }, function (e) {
+ testPassed("createImageBitmap promise rejected: " + e);
+ finishJSTest();
+ });*/
+ }
+}
</script>
</body>
</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/canvas/resources/zeroSize.svg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698