Index: third_party/WebKit/LayoutTests/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint.html |
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint.html b/third_party/WebKit/LayoutTests/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b5f66c483740540b54cfc087290a002b09d55752 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/css-grid-layout/grid-item-z-index-change-repaint.html |
@@ -0,0 +1,50 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<link href="../../../fast/css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet"> |
+<link href="../../../fast/css-grid-layout/resources/grid.css" rel="stylesheet"> |
+<style> |
+.grid { |
+ grid-template-rows: 100px; |
+ grid-template-columns: 200px 200px; |
+ margin-top: 10px; |
+} |
+.red { |
+ background-color: red; |
+} |
+.green { |
+ background-color: green; |
+} |
+.negativeZIndex { |
+ z-index: -1; |
+} |
+</style> |
+<script src="../resources/text-based-repaint.js"></script> |
+<script> |
+function repaintTest() |
+{ |
+ document.getElementById('item1').style.zIndex = 1; |
+ document.getElementById('item2').style.zIndex = 1; |
+} |
+ |
+window.onload = runRepaintAndPixelTest; |
+</script> |
+</head> |
+<body> |
+<div style="height: 100px"> |
+ <p>This test checks that grid items correctly repaint when 'z-index' changes.</p> |
+ <p>For this test to pass, there should be no red below.</p> |
+</div> |
+ |
+<div class="grid fit-content"> |
+ <div id="item1" class="sizedToGridArea green negativeZIndex"></div> |
+ <div class="sizedToGridArea red"></div> |
+</div> |
+ |
+<div class="grid fit-content"> |
+ <div id="item2" class="sizedToGridArea green"></div> |
+ <div class="sizedToGridArea red"></div> |
+</div> |
+ |
+</body> |
+</html> |