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

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

Issue 2343793002: Convert fast/canvas Layouttests to testharness (Closed)
Patch Set: Refactor3 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() {
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).data;
15 var expectedValue = [127, 128];
16 assert_in_array(imageData[3], expectedValue);
17 });
18 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698