| OLD | NEW |
| 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate | 1 // Asynchronous tests should manually call finishRepaintTest at the appropriate |
| 2 // time. | 2 // time. |
| 3 window.testIsAsync = false; | 3 window.testIsAsync = false; |
| 4 window.outputRepaintRects = true; | 4 window.outputRepaintRects = true; |
| 5 window.outputLayerList = false; | |
| 6 | 5 |
| 7 // All repaint tests are asynchronous. | 6 // All repaint tests are asynchronous. |
| 8 if (window.testRunner) | 7 if (window.testRunner) |
| 9 testRunner.waitUntilDone(); | 8 testRunner.waitUntilDone(); |
| 10 | 9 |
| 11 if (window.internals) { | 10 if (window.internals) { |
| 12 internals.settings.setUseDefaultImageInterpolationQuality(true); | 11 internals.settings.setUseDefaultImageInterpolationQuality(true); |
| 13 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true; | 12 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = true; |
| 14 } | 13 } |
| 15 | 14 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 return; | 71 return; |
| 73 | 72 |
| 74 // Force a style recalc. | 73 // Force a style recalc. |
| 75 forceStyleRecalc(); | 74 forceStyleRecalc(); |
| 76 | 75 |
| 77 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS; | 76 var flags = window.internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS; |
| 78 | 77 |
| 79 if (window.layerTreeAsTextAdditionalFlags) | 78 if (window.layerTreeAsTextAdditionalFlags) |
| 80 flags |= window.layerTreeAsTextAdditionalFlags; | 79 flags |= window.layerTreeAsTextAdditionalFlags; |
| 81 | 80 |
| 82 if (window.outputLayerList) | |
| 83 flags |= window.internals.OUTPUT_CHILDREN_AS_LAYER_LIST; | |
| 84 | |
| 85 var layersWithInvalidationsText = window.internals.layerTreeAsText(document,
flags); | 81 var layersWithInvalidationsText = window.internals.layerTreeAsText(document,
flags); |
| 86 | 82 |
| 87 checkObjectPaintInvalidations(layersWithInvalidationsText); | 83 checkObjectPaintInvalidations(layersWithInvalidationsText); |
| 88 | 84 |
| 89 internals.stopTrackingRepaints(document); | 85 internals.stopTrackingRepaints(document); |
| 90 | 86 |
| 91 // Play nice with JS tests which may want to print out assert results. | 87 // Play nice with JS tests which may want to print out assert results. |
| 92 if (window.isJsTest) | 88 if (window.isJsTest) |
| 93 window.outputRepaintRects = false; | 89 window.outputRepaintRects = false; |
| 94 | 90 |
| 95 if (window.outputRepaintRects) | 91 if (window.outputRepaintRects) |
| 96 testRunner.setCustomTextOutput(layersWithInvalidationsText); | 92 testRunner.setCustomTextOutput(layersWithInvalidationsText); |
| 97 | 93 |
| 98 if (window.afterTest) | 94 if (window.afterTest) |
| 99 window.afterTest(); | 95 window.afterTest(); |
| 100 | 96 |
| 101 // Play nice with async JS tests which want to notifyDone themselves. | 97 // Play nice with async JS tests which want to notifyDone themselves. |
| 102 if (!window.jsTestIsAsync) | 98 if (!window.jsTestIsAsync) |
| 103 testRunner.notifyDone(); | 99 testRunner.notifyDone(); |
| 104 } | 100 } |
| OLD | NEW |