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

Unified Diff: third_party/WebKit/LayoutTests/compositing/change-preferCompositingToLCDText-setting.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/change-preferCompositingToLCDText-setting.html
diff --git a/third_party/WebKit/LayoutTests/compositing/change-preferCompositingToLCDText-setting.html b/third_party/WebKit/LayoutTests/compositing/change-preferCompositingToLCDText-setting.html
index 816565142a5b959f5fde83b39484285fcb0efbbc..066061559db759b61dd0346466c6084c9e21ab2c 100644
--- a/third_party/WebKit/LayoutTests/compositing/change-preferCompositingToLCDText-setting.html
+++ b/third_party/WebKit/LayoutTests/compositing/change-preferCompositingToLCDText-setting.html
@@ -20,17 +20,14 @@
var t = async_test("Check that the preferCompositingToLCDText flag results in compositing");
-function isUsingCompositedScrolling(layer) {
- layer = layer || JSON.parse(window.internals.layerTreeAsText(document));
- if (layer.bounds[1] == 1000)
- return true;
- if (layer.children) {
- for (var i = 0; i < layer.children.length; i++) {
- if (isUsingCompositedScrolling(layer.children[i]))
- return true;
- }
- }
- return false;
+function isUsingCompositedScrolling() {
+ var layers = JSON.parse(window.internals.layerTreeAsText(document));
+ var found = false;
+ layers["layers"].forEach(function(layer) {
+ if (layer.bounds[1] == 1000)
+ found = true;
+ });
+ return found;
}
window.onload = function() {

Powered by Google App Engine
This is Rietveld 408576698