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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-rtl-column.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/flexbox/repaint-rtl-column.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-rtl-column.html b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-rtl-column.html
new file mode 100644
index 0000000000000000000000000000000000000000..4dfd2c64f6507bef07f55d2687c8cf1bbcb478fb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/repaint-rtl-column.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<style>
+#flexbox {
+ display: flex;
+ flex-flow: column;
+ height: 300px;
+ width: 200px;
+}
+#left {
+ flex: 1;
+ background-color: yellow;
+ min-height: 0;
+}
+#content {
+ flex: 1;
+ border: 5px solid blue;
+ min-height: 0;
+}
+#content > div {
+ height: 350px;
+ background-color: orange;
+}
+</style>
+<script src="../resources/text-based-repaint.js"></script>
+<script>
+// This test makes sure that we repaint the right region of a flexbox when
+// changing the flex values. Only the middle of the test page should be
+// repainted. If the top of the test page (above the flexbox) is repainted,
+// this test fails.
+function setFlex(value)
+{
+ document.getElementById("content").style.flex = value;
+}
+
+window.testIsAsync = true;
+window.onload = runRepaintAndPixelTest;
+
+function repaintTest() {
+ requestAnimationFrame(function() {
+ setFlex(4.6);
+ document.getElementById("content").offsetTop;
+ requestAnimationFrame(function() {
+ setFlex(5);
+ finishRepaintTest();
+ }, 1)
+ }, 1)
+};
+</script>
+<div style="height: 60px"></div>
+<div id="flexbox" dir="rtl">
+<div id="left"></div>
+<div id="content"><div></div></div>

Powered by Google App Engine
This is Rietveld 408576698