| 18 | for (auto* child : *viewNode) { |
| 19 | assertAllFlagsAreUpToDate(child); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | namespace { |
| 24 | |
| 25 | Ref<ViewNode> addSizedChild(ViewNodeTestsDependencies& utils, const Ref<ViewNode>& root) { |
| 26 | auto child = utils.createView(); |
| 27 | utils.setViewNodeAttribute(child, "width", Value(50.0)); |
| 28 | utils.setViewNodeAttribute(child, "height", Value(50.0)); |
| 29 | root->appendChild(utils.getViewTransactionScope(), child); |
| 30 | root->performLayout(utils.getViewTransactionScope(), Size(100, 100), LayoutDirectionLTR); |
| 31 | root->updateVisibilityAndPerformUpdates(utils.getViewTransactionScope()); |
| 32 | return child; |
| 33 | } |
| 34 | |
| 35 | } // namespace |
| 36 | |
| 37 | TEST(ViewNode, countsViewPoolMissesHitsAndDrops) { |
| 38 | ViewNodeTestsDependencies utils; |
| 39 | // Must precede the first view factory creation, which captures the setting. |
| 40 | utils.getViewManager().setAllowViewPooling(true); |
| 41 | auto root = utils.createRootView(); |
nothing calls this directly
no test coverage detected