Update the expectations of the tests now that the clearContents behavior is corrected.

This commit is contained in:
Scott Goodson
2015-12-27 16:37:33 -08:00
parent 93498d8240
commit 55861b3de1
2 changed files with 9 additions and 1 deletions

View File

@@ -1770,6 +1770,10 @@ static BOOL ShouldUseNewRenderingRange = NO;
// Trigger asynchronous measurement if it is not already cached or being calculated. // Trigger asynchronous measurement if it is not already cached or being calculated.
} }
// For the FetchData and Display ranges, we don't want to call -clear* if not being managed by a range controller.
// Otherwise we get flashing behavior from normal UIKit manipulations like navigation controller push / pop.
// Still, the interfaceState should be updated to the current state of the node; just don't act on the transition.
// Entered or exited data loading state. // Entered or exited data loading state.
if ((newState & ASInterfaceStateFetchData) != (oldState & ASInterfaceStateFetchData)) { if ((newState & ASInterfaceStateFetchData) != (oldState & ASInterfaceStateFetchData)) {
if (newState & ASInterfaceStateFetchData) { if (newState & ASInterfaceStateFetchData) {

View File

@@ -1702,7 +1702,11 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point
XCTAssert(node.interfaceState == ASInterfaceStateInHierarchy); XCTAssert(node.interfaceState == ASInterfaceStateInHierarchy);
[node.view removeFromSuperview]; [node.view removeFromSuperview];
XCTAssert(!node.hasFetchedData); // We don't want to call -clearFetchedData on nodes that aren't being managed by a range controller.
// Otherwise we get flashing behavior from normal UIKit manipulations like navigation controller push / pop.
// Still, the interfaceState should be None to reflect the current state of the node.
// We just don't proactively clear contents or fetched data for this state transition.
XCTAssert(node.hasFetchedData);
XCTAssert(node.interfaceState == ASInterfaceStateNone); XCTAssert(node.interfaceState == ASInterfaceStateNone);
} }