@@ -331,10 +331,8 @@ mod tests {
331331 let widget = NewWidget :: new ( Button :: with_text ( "Hello" ) ) ;
332332
333333 let window_size = Size :: new ( 100.0 , 40.0 ) ;
334- let mut params = TestHarnessParams :: DEFAULT ;
335- params. window_size = window_size;
336- params. padding_pixels = TestHarnessParams :: FUTURE_DEFAULT_PADDING_PIXELS ;
337- let mut harness = TestHarness :: create_with ( test_property_set ( ) , widget, params) ;
334+ let mut harness = TestHarness :: create_with_size ( test_property_set ( ) , widget, window_size) ;
335+ harness. use_future_default_padding ( ) ;
338336 let button_id = harness. root_id ( ) ;
339337
340338 assert_render_snapshot ! ( harness, "button_hello" ) ;
@@ -379,6 +377,7 @@ mod tests {
379377
380378 let mut harness =
381379 TestHarness :: create_with_size ( test_property_set ( ) , button, Size :: new ( 50.0 , 50.0 ) ) ;
380+ harness. use_future_default_padding ( ) ;
382381
383382 harness. render ( )
384383 } ;
@@ -388,6 +387,7 @@ mod tests {
388387
389388 let mut harness =
390389 TestHarness :: create_with_size ( test_property_set ( ) , button, Size :: new ( 50.0 , 50.0 ) ) ;
390+ harness. use_future_default_padding ( ) ;
391391
392392 harness. edit_root_widget ( |mut button| {
393393 let mut label = Button :: child_mut ( & mut button) ;
@@ -413,6 +413,7 @@ mod tests {
413413
414414 let window_size = Size :: new ( 200.0 , 80.0 ) ;
415415 let mut harness = TestHarness :: create_with_size ( test_property_set ( ) , button, window_size) ;
416+ harness. use_future_default_padding ( ) ;
416417
417418 harness. edit_root_widget ( |mut button| {
418419 button. insert_prop ( BorderColor { color : red } ) ;
@@ -456,6 +457,8 @@ mod tests {
456457 test_params. window_size = Size :: new ( 300.0 , 300.0 ) ;
457458 test_params. screenshot_tolerance = 32 ;
458459 let mut harness = TestHarness :: create_with ( test_property_set ( ) , root_widget, test_params) ;
460+ // Widget padded internally.
461+ harness. use_no_padding ( ) ;
459462
460463 harness. edit_root_widget ( |mut grid| {
461464 {
0 commit comments