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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html

Issue 2343793002: Convert fast/canvas Layouttests to testharness (Closed)
Patch Set: Removing the non js-test and adding new synchronous test 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <title>Ensure that globalAlpha is applied correctly to text.</title>
3 <head> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 </head> 5
6 <body> 6 <script>
7 <script src="script-tests/text-globalAlpha.js"></script> 7 test(function() {
Srirama 2016/09/16 06:58:43 I think it is not used anywhere else, so you can r
Abhishek Kanike 2016/09/16 08:53:41 Done.
8 </body> 8 var canvas = document.createElement('canvas');
9 </html> 9 var ctx = canvas.getContext('2d');
10 ctx.fillStyle = "black";
11 ctx.globalAlpha = 0.5;
12 ctx.font = "50px Arial";
13 ctx.fillText("A",50,50);
14 var imageData = ctx.getImageData(63, 22, 1, 1);
Srirama 2016/09/16 06:58:43 combine these two stmts. var imageData = ctx.getIm
Abhishek Kanike 2016/09/16 08:53:41 Done.
15 var imgdata = imageData.data;
16 var expectedValue = [127, 128];
17 assert_in_array(imgdata[3], expectedValue);
18 });
19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698