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

Unified Diff: LayoutTests/paint/invalidation/spv2/invalidate-after-composited-scroll.html

Issue 1324763002: Paint invalidation tests for slimming paint v2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: LayoutTests/paint/invalidation/spv2/invalidate-after-composited-scroll.html
diff --git a/LayoutTests/paint/invalidation/invalidate-after-composited-scroll.html b/LayoutTests/paint/invalidation/spv2/invalidate-after-composited-scroll.html
similarity index 51%
copy from LayoutTests/paint/invalidation/invalidate-after-composited-scroll.html
copy to LayoutTests/paint/invalidation/spv2/invalidate-after-composited-scroll.html
index d097a6e23fb07a492ac6fdce4f923826d945dc9d..a5d371031b70798b73d40e564e80712d1856886b 100644
--- a/LayoutTests/paint/invalidation/invalidate-after-composited-scroll.html
+++ b/LayoutTests/paint/invalidation/spv2/invalidate-after-composited-scroll.html
@@ -1,20 +1,27 @@
+<!-- Based on paint/invalidation/invalidate-after-composited-scroll.html -->
<!doctype HTML>
<div id="scroller" style="overflow:auto; will-change: transform; width: 200px; height: 200px; position: absolute; left: 300px; top: 300px;">
<div>
<div class="spacer" style="width: 1px; height: 2400px;"></div>
<div id="target" style="width: 100px; height: 100px; background: blue"></div>
<div class="spacer" style="width: 1px; height: 2400px;"></div>
- </div>
</div>
</div>
-<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
+<script src="resources/paint-invalidation-test.js"></script>
Tests that invalidation of a div after scrolling invalidates just the div and scrollbars, and no other area.
<script>
-function repaintTest() {
+// TODO(wangxianzhu): We should invalidate target (perhaps also the scrollbar) only.
chrishtr 2015/08/31 22:52:19 These results look wrong. The spacers etc should n
Xianzhu 2015/08/31 23:04:38 They are wrong because we don't have real composit
+window.expectedPaintInvalidationObjects = [
+ "VerticalScrollbar",
+ "LayoutBlockFlow (positioned) DIV id='scroller'",
+ "LayoutBlockFlow DIV",
+ "LayoutBlockFlow DIV class='spacer'",
+ "LayoutBlockFlow DIV id='target'",
+ "LayoutBlockFlow DIV class='spacer'"
+];
+function paintInvalidationTest() {
scroller.scrollTop = 2350;
target.style.background = "papayawhip";
- finishRepaintTest();
}
-window.testIsAsync = true;
-onload = runRepaintTest;
-</script>
+onload = runPaintInvalidationTest;
+</script>

Powered by Google App Engine
This is Rietveld 408576698