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

Unified Diff: LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry-expected.html

Issue 1302183007: Convert some text-based-repaint tests for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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: LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry-expected.html
diff --git a/LayoutTests/fast/repaint/position-change-keeping-geometry.html b/LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry-expected.html
similarity index 53%
copy from LayoutTests/fast/repaint/position-change-keeping-geometry.html
copy to LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry-expected.html
index f65a25e76d06566eb76d1cf740be1eb3a26026bf..e7057499ca0e72a207f165766a131561d2321a05 100644
--- a/LayoutTests/fast/repaint/position-change-keeping-geometry.html
+++ b/LayoutTests/paint/invalidation/spv2/position-change-keeping-geometry-expected.html
@@ -1,23 +1,4 @@
<!DOCTYPE html>
-<script src="resources/text-based-repaint.js"></script>
-<script>
-function changePositionKeepingGeometry(id, newPosition) {
- var target = document.getElementById(id);
- var originalTop = target.offsetTop;
- var originalLeft = target.offsetLeft;
- target.style.position = newPosition;
- target.style.top = originalTop + 'px';
- target.style.left = originalLeft + 'px';
-}
-
-function repaintTest()
-{
- changePositionKeepingGeometry('target1', 'absolute');
- changePositionKeepingGeometry('target2', 'absolute');
- changePositionKeepingGeometry('target3', 'fixed');
-}
-onload = runRepaintTest;
-</script>
<style>
body {
margin: 0;
@@ -34,16 +15,16 @@ div {
}
#target1 {
left: 20px;
- position: relative;
+ position: absolute;
}
#target2 {
left: 220px;
- position: fixed;
+ position: absolute;
z-index: 0;
}
#target3 {
left: 420px;
- position: absolute;
+ position: fixed;
z-index: 0;
}
</style>
@@ -53,3 +34,6 @@ There should be no invalildations on change of position without actual change of
<div id="target1"></div>
<div id="target2"></div>
<div id="target3"></div>
+<script>
+ target1.style.top = target0.offsetTop + target0.offsetHeight + 'px';
+</script>

Powered by Google App Engine
This is Rietveld 408576698