This test has the following code:
var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_ROOT_LAYER);
if (layerTree.indexOf('\n {\n\n }\n') != -1)
layerTree = internals.layerTreeAsText(document, 1 | internals.LAYER_TREE_INCLUDES_ROOT_LAYER);
It doesn't make sense to call layerTreeAsText twice, and there are no comments to indicate the significance of the string '\n {\n\n }\n'. We should decide what flags are appropriate, and pass them the first time.
(Further note: http://crrev.com/1151153003 seems to have been landed TBR without code review. I think this is not an appropriate use of TBR per https://chromium.googlesource.com/chromium/src/+/master/docs/code_reviews.md#TBR-To-Be-Reviewed. Changes to layout tests should go through the same review process as normal code.)
Comment 1 by bugdroid1@chromium.org
, Oct 26 2017