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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/text-rendering-frameless-canvas.html

Issue 2336693002: Rendering text to a canvas in a frame-less document. (Closed)
Patch Set: Adding the failed tests to TestExpectations for Mac. Created 4 years, 3 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
Index: third_party/WebKit/LayoutTests/fast/canvas/text-rendering-frameless-canvas.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/text-rendering-frameless-canvas.html b/third_party/WebKit/LayoutTests/fast/canvas/text-rendering-frameless-canvas.html
new file mode 100644
index 0000000000000000000000000000000000000000..64fef5a1ce750b1b7c52897d2c5562e14dcd1702
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/text-rendering-frameless-canvas.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<body>
+
+<canvas id="srcCanvas" width="200" height="100" style="border:1px solid #d3d3d3;"></canvas>
+<canvas id="srcCanvas2" width="200" height="100" style="border:1px solid #d3d3d3;"></canvas>
+
+<script>
+var cnv1 = document.getElementById('srcCanvas');
+document.implementation.createDocument('' ,'' ,null).adoptNode(cnv1);
+var ctx = cnv1.getContext('2d');
+// We don't set the font here. We expect to fallback to default font.
+ctx.strokeStyle='rgba(140, 0.013953202404081821)';
+ctx.strokeText('Hello World!' ,1, 30);
+ctx.font = "30px Verdana";
+ctx.strokeText('Goodbye!' ,1, 70);
+
+var cnv2=document.getElementById('srcCanvas2');
+var ctx2=cnv2.getContext('2d');
+ctx2.drawImage(cnv1, 0, 0);
+</script>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698