| Index: third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html b/third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html
|
| index 254bf74871619cba0f852e3ce85771b7a93691e2..02698c55655914ca083b39ad37f9463a566cfef6 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/dom/CompositorProxy/proxy-forces-layer.html
|
| @@ -9,35 +9,31 @@ async_test(function(test) {
|
| window.addEventListener('load', function() {
|
| // The container should not have a layer.
|
| var container = document.getElementById('container');
|
| - var docLayer = JSON.parse(window.internals.layerTreeAsText(document));
|
| - assert_equals(1, docLayer.children.length);
|
| - assert_equals('undefined', typeof docLayer.children[0].children);
|
| + var layers = JSON.parse(window.internals.layerTreeAsText(document))["layers"];
|
| + assert_equals(1, layers.length);
|
|
|
| // Creating a proxy should force the container to have a layer.
|
| var proxy = new CompositorProxy(container, ['opacity']);
|
| - docLayer = JSON.parse(window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_COMPOSITING_REASONS));
|
| - assert_equals(1, docLayer.children.length);
|
| - assert_equals(1, docLayer.children[0].children.length);
|
| - assert_in_array('compositorProxy', docLayer.children[0].children[0].compositingReasons);
|
| + layers = JSON.parse(window.internals.layerTreeAsText(document,
|
| + internals.LAYER_TREE_INCLUDES_COMPOSITING_REASONS))["layers"];
|
| + assert_equals(2, layers.length);
|
| + assert_in_array('compositorProxy', layers[1].compositingReasons);
|
|
|
| // Detach the element from the document. The corresponding layer should be removed.
|
| container.parentNode.removeChild(container);
|
| - docLayer = JSON.parse(window.internals.layerTreeAsText(document));
|
| - assert_equals(1, docLayer.children.length);
|
| - assert_equals('undefined', typeof docLayer.children[0].children);
|
| + layers = JSON.parse(window.internals.layerTreeAsText(document))["layers"];
|
| + assert_equals(1, layers.length);
|
|
|
| // Add the element back to the document. The corresponding layer should reappear.
|
| document.body.appendChild(container);
|
| - docLayer = JSON.parse(window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_COMPOSITING_REASONS));
|
| - assert_equals(1, docLayer.children.length);
|
| - assert_equals(1, docLayer.children[0].children.length);
|
| - assert_in_array('compositorProxy', docLayer.children[0].children[0].compositingReasons);
|
| + layers = JSON.parse(window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_COMPOSITING_REASONS))["layers"];
|
| + assert_equals(2, layers.length);
|
| + assert_in_array('compositorProxy', layers[1].compositingReasons);
|
|
|
| // Disconnecting the proxy should also remove the layer.
|
| proxy.disconnect();
|
| - docLayer = JSON.parse(window.internals.layerTreeAsText(document));
|
| - assert_equals(1, docLayer.children.length);
|
| - assert_equals('undefined', typeof docLayer.children[0].children);
|
| + layers = JSON.parse(window.internals.layerTreeAsText(document))["layers"];
|
| + assert_equals(1, layers.length);
|
|
|
| test.done();
|
| });
|
|
|