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

Unified Diff: LayoutTests/compositing/overflow/do-not-opt-in-with-out-of-flow-descendant.html

Issue 244193002: Enable universal accelerated overflow scroll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test expectations for crashing test. Created 6 years, 8 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/overflow/do-not-opt-in-with-out-of-flow-descendant.html
diff --git a/LayoutTests/compositing/overflow/do-not-opt-in-with-out-of-flow-descendant.html b/LayoutTests/compositing/overflow/do-not-opt-in-with-out-of-flow-descendant.html
deleted file mode 100644
index aa873383808c0ce150eaa4753528f4afb2ba86a3..0000000000000000000000000000000000000000
--- a/LayoutTests/compositing/overflow/do-not-opt-in-with-out-of-flow-descendant.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <style>
- #container {
- width: 200px;
- height: 200px;
- overflow: scroll;
- margin: 20px;
- border: 1px solid black;
- }
-
- #abs-pos-ancestor {
- width: 500px;
- height: 500px;
- position: absolute;
- z-index: 0;
- }
-
- #positioned-ancestor {
- width: 150px;
- height: 300px;
- position: relative;
- }
-
- #descendant {
- left: 10px;
- top: 10px;
- width: 50px;
- height: 50px;
- background-color: blue;
- position: absolute;
- z-index: -20;
- }
- </style>
- <script>
- var debugMode = false;
-
- if (window.testRunner)
- testRunner.dumpAsText();
-
- if (window.internals) {
- window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
- window.internals.settings.setCompositorDrivenAcceleratedScrollingEnabled(false);
- }
-
- function write(str)
- {
- var pre = document.getElementById('console');
- var text = document.createTextNode(str + '\n');
- pre.appendChild(text);
- }
-
- var iteration = 0;
- function printResult(expectedResult)
- {
- // Force a style recalc.
- document.body.offsetTop;
-
- if (window.internals) {
- var container = document.getElementById('container');
- var containerOptedIn = window.internals.needsCompositedScrolling(container);
-
- var passed = containerOptedIn === expectedResult;
- if (passed)
- write('Iteration ' + iteration.toString() + ': Passed')
- else
- write('Iteration ' + iteration.toString() + ': FAILED')
-
- if (containerOptedIn) {
- write('Iteration ' + iteration.toString() + ', container is composited');
- if (debugMode || !passed) {
- var layerTree = window.internals.layerTreeAsText(document);
- write(layerTree);
- }
- } else
- write('Iteration ' + iteration.toString() + ', container is not composited');
- }
- iteration++;
- }
-
- function doTest()
- {
- var container = document.getElementById('container');
- var positionedAncestor = document.getElementById('positioned-ancestor');
- var descendant = document.getElementById('descendant');
-
- // Initial configuration should opt in.
- printResult(true);
-
- // If positioned ancestor ceases to be positioned, the containing
- // will become the abs-pos-ancestor. We should opt out.
- positionedAncestor.style.position = 'static';
- printResult(false);
-
- // If we get rid of the out-of-flow positioned descendant at this point,
- // it should be ok to opt back in.
- descendant.style.display = 'none';
- printResult(true);
-
- // This should return us to our previous state.
- descendant.style.display = '';
- printResult(false);
-
- // If the descendant ceases to be out-of-flow-positioned, then we should
- // opt in.
- descendant.style.position = 'static';
- printResult(true);
-
- // This should return us to our previous state.
- descendant.style.position = '';
- printResult(false);
-
- // If the positionedAncestor again becomes positioned, it will become the
- // containing block for the descendant and we should opt in.
- positionedAncestor.style.position = 'relative';
- printResult(true);
- } // function doTest
-
- window.addEventListener('load', doTest, false);
- </script>
-</head>
-
-<body>
- <div id="abs-pos-ancestor">
- <div id="container">
- <div id="positioned-ancestor">
- <div id="descendant"></div>
- </div>
- </div>
- </div>
- <pre id="console"></pre>
-</body>
-</html>
-

Powered by Google App Engine
This is Rietveld 408576698