• Ian Hickson's avatar
    Make tests more realistic (#5762) · 5bc8888e
    Ian Hickson authored
    Previously, pumpWidget() would do a partial pump (it didn't trigger
    Ticker callbacks or post-frame callbacks), and pump() would do a full
    pump. This patch brings them closer together. It also makes runApp run a
    full actual frame, rather than skipping the transient callback part of
    the frame logic. Having "half-frames" in the system was confusing and
    could lead to bugs where code expecting to run before the next layout
    pass didn't because a "half-frame" ran first.
    
    Also, make Tickers start ticking in the frame that they were started in,
    if they were started during a frame. This means we no longer spin a
    frame for t=0, we jump straight to the first actual frame.
    
    Other changes in this patch:
    
    * rename WidgetsBinding._runApp to WidgetsBinding.attachRootWidget, so
      that tests can use it to more accurately mock out runApp.
    
    * allow loadStructuredData to return synchronously.
    
    * make handleBeginFrame handle not being given a time stamp.
    
    * make DataPipeImageProvider.loadAsync protected (rather than private),
      and document it. There wasn't really a reason for it to be private.
    
    * fix ImageConfiguration.toString.
    
    * introduce debugPrintBuildScope and debugPrintScheduleBuildForStacks,
      which can help debug problems with widgets getting marked as dirty but
      not cleaned.
    
    * make debugPrintRebuildDirtyWidgets say "Building" the first time and
      "Rebuilding" the second, to make it clearer when a widget is first
      created. This makes debugging widget lifecycle issues much easier.
    
    * make debugDumpApp more resilient.
    
    * debugPrintStack now takes a label that is printed before the stack.
    
    * improve the banner shown for debugPrintBeginFrameBanner.
    
    * various and sundry documentation fixes
    5bc8888e
Name
Last commit
Last update
..
README.md Loading commit data...
animated_size.dart Loading commit data...
auto_layout.dart Loading commit data...
binding.dart Loading commit data...
block.dart Loading commit data...
box.dart Loading commit data...
child_view.dart Loading commit data...
custom_layout.dart Loading commit data...
debug.dart Loading commit data...
editable_line.dart Loading commit data...
error.dart Loading commit data...
flex.dart Loading commit data...
flow.dart Loading commit data...
grid.dart Loading commit data...
image.dart Loading commit data...
layer.dart Loading commit data...
list.dart Loading commit data...
node.dart Loading commit data...
object.dart Loading commit data...
paragraph.dart Loading commit data...
performance_overlay.dart Loading commit data...
proxy_box.dart Loading commit data...
rotated_box.dart Loading commit data...
semantics.dart Loading commit data...
shifted_box.dart Loading commit data...
stack.dart Loading commit data...
table.dart Loading commit data...
tweens.dart Loading commit data...
view.dart Loading commit data...
viewport.dart Loading commit data...