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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-invoke-deferred-compositing.html

Issue 2321183002: Move repaint tests (except for svg/) to paint/invalidation (Closed)
Patch Set: - 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-invoke-deferred-compositing.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-invoke-deferred-compositing.html b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-invoke-deferred-compositing.html
new file mode 100644
index 0000000000000000000000000000000000000000..667b61f74500ad3fe661ca3767f2814f1cd62406
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/should-invoke-deferred-compositing.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+
+<!-- crbug.com/336676 - layer creation should not accidentally skip requesting
+ the compositor for a frame to be produced. When there were no other
+ repaints or layout/style changes, the simple act of adding a layer was not
+ triggering compositing updates by itself. To recreate this scenario, an
+ out-of-flow canvas element is added to an empty composited layer. The
+ actual container layer does not get added to the tree until it realizes
+ that it receives the canvas content. -->
+
+
+<html>
+<head>
+<script src="../resources/text-based-repaint.js"></script>
+<style>
+
+.composited {
+ transform: translatez(0);
+}
+
+.box {
+ position: absolute;
+ z-index: 1;
+ width: 300px;
+ height: 300px;
+ top: 0px;
+ left: 0px;
+}
+
+canvas {
+ position: absolute;
+ z-index: 1;
+ top: 0px;
+ left: 0px;
+}
+
+</style>
+
+<script>
+ function repaintTest() {
+ var canvasElement = document.createElement("canvas");
+ canvasElement.width = 200;
+ canvasElement.height = 200;
+ var context = canvasElement.getContext("2d");
+ context.fillStyle = "green";
+ context.fillRect(80, 80, 50, 50);
+ document.getElementById("container").appendChild(canvasElement);
+ }
+</script>
+</head>
+
+<body onload="runRepaintAndPixelTest()">
+ <div id="container" class="composited box"></div>
+</body>
+
+</html>

Powered by Google App Engine
This is Rietveld 408576698