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

Unified Diff: third_party/WebKit/LayoutTests/csspaint/background-image-alpha-expected.html

Issue 2077413005: Add "alpha" option to PaintWorklet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set alpha to be true by default Created 4 years, 5 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/csspaint/background-image-alpha-expected.html
diff --git a/third_party/WebKit/LayoutTests/csspaint/background-image-alpha-expected.html b/third_party/WebKit/LayoutTests/csspaint/background-image-alpha-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..519b3599e95d0bc3463bfc077f6022edeaa4ca8c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/csspaint/background-image-alpha-expected.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+#background {
+ background-color: yellow;
+ display: inline-block;
+}
+
+.container {
+ font-size: 0px;
+}
+</style>
+</head>
+<body>
+
+<div id="background">
+ <div class="container">
+ <canvas id ="opaque" width="100" height="100"></canvas>
+ </div>
+ <div class="container">
+ <canvas id ="nonopaque" width="100" height="100"></canvas>
+ </div>
+</div>
+
+<script>
+function drawCanvas(canvasID, hasAlpha) {
+ var canvas = document.getElementById(canvasID);
+ var context = canvas.getContext("2d", {alpha: hasAlpha});
+ context.clearRect(0, 0, canvas.width, canvas.height);
+ context.strokeStyle = 'blue';
+ context.lineWidth = 4;
+ context.strokeRect(20, 20, 60, 60);
+};
+
+drawCanvas('opaque', false);
+drawCanvas('nonopaque', true);
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698