1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/image-element/canvas-outside-document-invalidate-02.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/licenses/publicdomain/ 1.7 + 1.8 + Test that a complete redraw of the context invalidates the rendering observer, too. 1.9 + (mozDrawText calls nsCanvasRenderingContext2D::Redraw() without a dirty rect to invalidate everything.) 1.10 +--> 1.11 +<!DOCTYPE html> 1.12 +<html class="reftest-wait"> 1.13 +<meta charset="utf-8"> 1.14 +<body style="background: -moz-element(#e) white"> 1.15 + 1.16 +<script> 1.17 + 1.18 +var canvas = document.createElement("canvas"); 1.19 +canvas.width = canvas.height = 1; 1.20 +var ctx = canvas.getContext('2d'); 1.21 +ctx.fillStyle = "red"; 1.22 +ctx.fillRect(0, 0, 1, 1); 1.23 +window.addEventListener("MozReftestInvalidate", function () { 1.24 + ctx.strokeStyle = "white"; 1.25 + ctx.font = "50px bold Arial"; 1.26 + ctx.translate(-8, 18); 1.27 + ctx.lineWidth = 50; 1.28 + ctx.strokeText("•", 0, 0); 1.29 + document.documentElement.className = ""; 1.30 +}, false); 1.31 + 1.32 +document.mozSetImageElement("e", canvas); 1.33 + 1.34 +</script> 1.35 +</body> 1.36 +</html>