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

Unified Diff: LayoutTests/compositing/squashing/squash-above-fixed-3.html

Issue 191693002: Delay scrollContents until the next paint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix layout tests Created 6 years, 9 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/compositing/squashing/squash-above-fixed-3.html
diff --git a/LayoutTests/compositing/squashing/squash-above-fixed-3.html b/LayoutTests/compositing/squashing/squash-above-fixed-3.html
index d938882cdd6df7df50f7d0330b36e3ff7d671748..92dd8e9f76146fd71d607181811f4e7213f0dae5 100644
--- a/LayoutTests/compositing/squashing/squash-above-fixed-3.html
+++ b/LayoutTests/compositing/squashing/squash-above-fixed-3.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
+<script src="../../resources/run-after-display.js"></script>
<style>
#backgroundFixed {
@@ -59,8 +60,10 @@ body {
</style>
<script>
- if (window.testRunner)
+ if (window.testRunner) {
testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
if (window.internals)
internals.settings.setLayerSquashingEnabled(true);
@@ -76,17 +79,24 @@ body {
// Case 2
window.internals.startTrackingRepaints(document);
window.scrollTo(0, 10);
- document.getElementById('Case2').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
- window.internals.stopTrackingRepaints(document);
-
- // Case 3
- window.internals.startTrackingRepaints(document);
- window.scrollTo(0, 110);
- document.getElementById('Case3').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
- window.internals.stopTrackingRepaints(document);
-
- // Display the test results only after test is done so that it does not affect repaint rect results.
- document.getElementById('testResults').style.display = "block";
+ runAfterDisplay(function() {
+ document.getElementById('Case2').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+ window.internals.stopTrackingRepaints(document);
+
+ // Case 3
+ window.internals.startTrackingRepaints(document);
+ window.scrollTo(0, 110);
+ runAfterDisplay(function() {
+ document.getElementById('Case3').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+ window.internals.stopTrackingRepaints(document);
+
+ // Display the test results only after test is done so that it does not affect repaint rect results.
+ document.getElementById('testResults').style.display = "block";
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ });
}
</script>
</head>

Powered by Google App Engine
This is Rietveld 408576698