• 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
..
app_bar_test.dart Loading commit data...
app_test.dart Loading commit data...
arc_test.dart Loading commit data...
chip_test.dart Loading commit data...
circle_avatar_test.dart Loading commit data...
date_picker_test.dart Loading commit data...
divider_test.dart Loading commit data...
drawer_test.dart Loading commit data...
drop_down_test.dart Loading commit data...
expand_icon_test.dart Loading commit data...
expansion_panels_test.dart Loading commit data...
flexible_space_bar_test.dart Loading commit data...
floating_action_button_test.dart Loading commit data...
icon_button_test.dart Loading commit data...
icon_data_test.dart Loading commit data...
icon_test.dart Loading commit data...
image_icon_test.dart Loading commit data...
material_test.dart Loading commit data...
mergeable_material_test.dart Loading commit data...
popup_menu_test.dart Loading commit data...
progress_indicator_test.dart Loading commit data...
refresh_indicator_test.dart Loading commit data...
scaffold_test.dart Loading commit data...
scrollbar_test.dart Loading commit data...
slider_test.dart Loading commit data...
snack_bar_test.dart Loading commit data...
switch_test.dart Loading commit data...
tabs_test.dart Loading commit data...
time_picker_test.dart Loading commit data...
tooltip_test.dart Loading commit data...
two_level_list_test.dart Loading commit data...
user_accounts_drawer_header_test.dart Loading commit data...