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

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.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-opaque-to-transparent.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html
index 34d8fff8f606940fdfca18965daf26d65e3e2d6f..ebfc88a115c3c4adf67e76d8f6d73286f27250b5 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.html
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-scroll-background-opaque-to-transparent.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,30 +9,6 @@
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;
@@ -48,7 +25,7 @@
runAfterLayoutAndPaint(function() {
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