Skip to content

Commit

Permalink
testLayoutTransitionWithAsyncMeasurement passes now
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhuy committed Dec 1, 2017
1 parent 616bf00 commit 94d7c80
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions Tests/ASLayoutEngineTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,6 @@ - (void)testSetNeedsLayoutAndNormalLayoutPass
*/
- (void)testLayoutTransitionWithAsyncMeasurement
{
// BUG: There is an extra main-thread layout pass run on nodeC, and its result is discarded.
static BOOL enforceCorrectBehavior = NO;

[self stubCalculatedLayoutDidChange];
[self runFirstLayoutPassWithFixture:fixture1];

Expand Down Expand Up @@ -167,15 +164,6 @@ - (void)testLayoutTransitionWithAsyncMeasurement
injectedMainThreadWork = ^{
injectedMainThreadWorkDone = YES;

// BUG: nodeC survives but gets a layout update during transition.
// When this layout pass comes down, its parent will set its new frame which will
// trigger the layout pass to go down into it and we will measure against that new bounds.
// The new bounds will be the post-transition size.
if (!enforceCorrectBehavior) {
auto postTransitionSize = [fixture2 layoutForNode:nodeC].size;
OCMExpect([nodeC.mock calculateLayoutThatFits:ASSizeRangeMake(postTransitionSize)]).onMainThread();
}

[window layoutIfNeeded];

// Ensure we're still on the old layout. We should stay on this until the transition completes.
Expand Down

0 comments on commit 94d7c80

Please sign in to comment.