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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html

Issue 2397333002: Change layerTreeAsText to default to layer lists. (Closed)
Patch Set: none Created 4 years, 2 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/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html
index 105ef2d582f283720ef0b2b1d1ca51d6b6e6f5e0..bd9dfa22c6a4214a61066c11c6726dd95a82aa5c 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-transparent-to-opaque.html
@@ -1,4 +1,5 @@
<script src="../../resources/run-after-layout-and-paint.js"></script>
+<script src="resources/composited-scroll.js"></script>
<script>
if (window.internals)
internals.runtimeFlags.compositeOpaqueScrollersEnabled = true;
@@ -8,36 +9,12 @@
testRunner.waitUntilDone();
}
- function hasOpaqueCompositedScrollingContentsLayer(layer) {
- if (layer.name == "Scrolling Contents Layer")
- return layer.contentsOpaque;
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++) {
- if (hasOpaqueCompositedScrollingContentsLayer(layer.children[i]))
- return true;
- }
- }
- return false;
- }
-
- function hasCompositedScrollingContentsLayer(layer) {
- if (layer.name == "Scrolling Contents Layer")
- return true;
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++) {
- if (hasCompositedScrollingContentsLayer(layer.children[i]))
- return true;
- }
- }
- return false;
- }
-
onload = function() {
if (!window.testRunner || !window.internals)
return;
var result = "Should not have opaque composited scrolling contents layer: ";
- if (!hasCompositedScrollingContentsLayer(JSON.parse(window.internals.layerTreeAsText(document))))
+ if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document))))
result += "Pass.\n";
else
result += "Fail.\n";

Powered by Google App Engine
This is Rietveld 408576698