Index: third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html |
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html b/third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html |
index bdb6b31c2d1a62924b4f494875516179688fc9ac..0c56557affb2eadf258eeb5710a7ea06066496e2 100644 |
--- a/third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html |
+++ b/third_party/WebKit/LayoutTests/fast/canvas/text-globalAlpha.html |
@@ -1,9 +1,18 @@ |
<!DOCTYPE HTML> |
-<html> |
-<head> |
-<script src="../../resources/js-test.js"></script> |
-</head> |
-<body> |
-<script src="script-tests/text-globalAlpha.js"></script> |
-</body> |
-</html> |
+<title>Ensure that globalAlpha is applied correctly to text.</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+ |
+<script> |
+test(function() { |
+ var canvas = document.createElement('canvas'); |
+ var ctx = canvas.getContext('2d'); |
+ ctx.fillStyle = "black"; |
+ ctx.globalAlpha = 0.5; |
+ ctx.font = "50px Arial"; |
+ ctx.fillText("A",50,50); |
+ var imageData = ctx.getImageData(63, 22, 1, 1).data; |
+ var expectedValue = [127, 128]; |
+ assert_in_array(imageData[3], expectedValue); |
+}); |
+</script> |