Index: third_party/WebKit/LayoutTests/compositing/overflow/descendant-with-clip-path.html |
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/descendant-with-clip-path.html b/third_party/WebKit/LayoutTests/compositing/overflow/descendant-with-clip-path.html |
index 2118dba60e91d1d2ad506d66e9359f72aae39a56..82bc43cdaff133ba4f8160004c7b777c782de773 100644 |
--- a/third_party/WebKit/LayoutTests/compositing/overflow/descendant-with-clip-path.html |
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/descendant-with-clip-path.html |
@@ -1,4 +1,5 @@ |
<!DOCTYPE HTML> |
+<script src="resources/composited-scroll.js"></script> |
<style> |
#scroller { |
overflow: scroll; |
@@ -28,18 +29,6 @@ |
</div> |
</div> |
<script> |
-function isUsingCompositedScrolling(layer) { |
- 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; |
-} |
- |
if (window.internals) |
window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
@@ -53,7 +42,7 @@ var result = ""; |
onload = function() { |
if (window.internals) { |
result += "No clip path descendant (should be using composited scrolling): "; |
- if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document)))) |
+ if (isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) |
result += "Pass.\n"; |
else |
result += "Fail.\n" |
@@ -62,7 +51,7 @@ onload = function() { |
requestAnimationFrame(function() { |
if (window.internals) { |
result += "Has clip path descendant (should not be using composited scrolling): "; |
- if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document)))) |
+ if (!isUsingCompositedScrolling(JSON.parse(window.internals.layerTreeAsText(document, window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST)))) |
result += "Pass.\n"; |
else |
result += "Fail.\n" |