From d041f3ead58c5d543c4519f50781aeaa57b89b28 Mon Sep 17 00:00:00 2001 From: Hixie Date: Fri, 13 Nov 2015 11:13:33 -0800 Subject: [PATCH] More resilient Widget tests - force the time dilation to 1.0 for the Widget tests, so that a local change doesn't break all the tests during development. - add missing license block to all the files. - set ui.window.onBeginFrame to null when you use WidgetTester, so that the engine doesn't trigger any confusing frames after our fake frames. --- packages/unit/test/widget/align_test.dart | 4 ++++ .../unit/test/widget/animated_container_test.dart | 4 ++++ packages/unit/test/widget/block_test.dart | 4 ++++ packages/unit/test/widget/bottom_sheet_test.dart | 4 ++++ packages/unit/test/widget/box_decoration_test.dart | 4 ++++ packages/unit/test/widget/build_scope_test.dart | 4 ++++ packages/unit/test/widget/center_test.dart | 4 ++++ packages/unit/test/widget/coordinates_test.dart | 4 ++++ .../test/widget/custom_multi_child_layout_test.dart | 4 ++++ .../test/widget/custom_one_child_layout_test.dart | 4 ++++ packages/unit/test/widget/date_picker_test.dart | 4 ++++ packages/unit/test/widget/dismissable_test.dart | 5 +++++ packages/unit/test/widget/draggable_test.dart | 4 ++++ packages/unit/test/widget/drawer_test.dart | 4 ++++ packages/unit/test/widget/duplicate_key_test.dart | 4 ++++ packages/unit/test/widget/flex_test.dart | 4 ++++ packages/unit/test/widget/focus_test.dart | 4 ++++ .../unit/test/widget/fractionally_sized_box_test.dart | 4 ++++ packages/unit/test/widget/gesture_detector_test.dart | 4 ++++ packages/unit/test/widget/heroes_test.dart | 4 ++++ .../unit/test/widget/homogeneous_viewport_test.dart | 4 ++++ packages/unit/test/widget/input_test.dart | 4 ++++ packages/unit/test/widget/listener_test.dart | 4 ++++ packages/unit/test/widget/mixed_viewport_test.dart | 4 ++++ packages/unit/test/widget/multichild_test.dart | 4 ++++ packages/unit/test/widget/navigator_test.dart | 4 ++++ packages/unit/test/widget/pageable_list_test.dart | 4 ++++ packages/unit/test/widget/parent_data_test.dart | 4 ++++ packages/unit/test/widget/positioned_test.dart | 4 ++++ .../unit/test/widget/progress_indicator_test.dart | 4 ++++ .../unit/test/widget/render_object_widget_test.dart | 4 ++++ .../test/widget/scrollable_list_hit_testing_test.dart | 4 ++++ .../test/widget/scrollable_list_horizontal_test.dart | 4 ++++ .../test/widget/scrollable_list_vertical_test.dart | 4 ++++ .../widget/scrollable_list_with_inherited_test.dart | 4 ++++ packages/unit/test/widget/set_state_test.dart | 4 ++++ packages/unit/test/widget/shader_mask_test.dart | 4 ++++ packages/unit/test/widget/size_observer_test.dart | 4 ++++ packages/unit/test/widget/snack_bar_test.dart | 4 ++++ packages/unit/test/widget/stack_test.dart | 4 ++++ .../unit/test/widget/stateful_component_test.dart | 4 ++++ .../unit/test/widget/stateful_components_test.dart | 4 ++++ packages/unit/test/widget/syncing_test.dart | 4 ++++ packages/unit/test/widget/tabs_test.dart | 4 ++++ packages/unit/test/widget/test_widgets.dart | 4 ++++ packages/unit/test/widget/transform_test.dart | 4 ++++ packages/unit/test/widget/widget_tester.dart | 11 ++++++++++- 47 files changed, 195 insertions(+), 1 deletion(-) diff --git a/packages/unit/test/widget/align_test.dart b/packages/unit/test/widget/align_test.dart index 6d3d05fc6e..6a42aee908 100644 --- a/packages/unit/test/widget/align_test.dart +++ b/packages/unit/test/widget/align_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/animated_container_test.dart b/packages/unit/test/widget/animated_container_test.dart index 653f20f602..b048e0e334 100644 --- a/packages/unit/test/widget/animated_container_test.dart +++ b/packages/unit/test/widget/animated_container_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/animation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; diff --git a/packages/unit/test/widget/block_test.dart b/packages/unit/test/widget/block_test.dart index b0722d9c83..88075291fe 100644 --- a/packages/unit/test/widget/block_test.dart +++ b/packages/unit/test/widget/block_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/bottom_sheet_test.dart b/packages/unit/test/widget/bottom_sheet_test.dart index a391afb62f..92113964d5 100644 --- a/packages/unit/test/widget/bottom_sheet_test.dart +++ b/packages/unit/test/widget/bottom_sheet_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/box_decoration_test.dart b/packages/unit/test/widget/box_decoration_test.dart index 57bdcd460c..01bad08c47 100644 --- a/packages/unit/test/widget/box_decoration_test.dart +++ b/packages/unit/test/widget/box_decoration_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/build_scope_test.dart b/packages/unit/test/widget/build_scope_test.dart index ccb8788e92..0df49a94b2 100644 --- a/packages/unit/test/widget/build_scope_test.dart +++ b/packages/unit/test/widget/build_scope_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/animation.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/center_test.dart b/packages/unit/test/widget/center_test.dart index ee21e6b499..f5a7d0fa90 100644 --- a/packages/unit/test/widget/center_test.dart +++ b/packages/unit/test/widget/center_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/coordinates_test.dart b/packages/unit/test/widget/coordinates_test.dart index 3bd3808555..a6d658bdf6 100644 --- a/packages/unit/test/widget/coordinates_test.dart +++ b/packages/unit/test/widget/coordinates_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/custom_multi_child_layout_test.dart b/packages/unit/test/widget/custom_multi_child_layout_test.dart index 324be32601..3fc36f2e3d 100644 --- a/packages/unit/test/widget/custom_multi_child_layout_test.dart +++ b/packages/unit/test/widget/custom_multi_child_layout_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/custom_one_child_layout_test.dart b/packages/unit/test/widget/custom_one_child_layout_test.dart index 6010414d47..521216bb11 100644 --- a/packages/unit/test/widget/custom_one_child_layout_test.dart +++ b/packages/unit/test/widget/custom_one_child_layout_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/date_picker_test.dart b/packages/unit/test/widget/date_picker_test.dart index 0fdbdc49bb..e6459385b6 100644 --- a/packages/unit/test/widget/date_picker_test.dart +++ b/packages/unit/test/widget/date_picker_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/dismissable_test.dart b/packages/unit/test/widget/dismissable_test.dart index 05449ed464..a2f928b6ae 100644 --- a/packages/unit/test/widget/dismissable_test.dart +++ b/packages/unit/test/widget/dismissable_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; @@ -280,3 +284,4 @@ void main() { }); }); } + diff --git a/packages/unit/test/widget/draggable_test.dart b/packages/unit/test/widget/draggable_test.dart index 38d8994579..96e0d9d050 100644 --- a/packages/unit/test/widget/draggable_test.dart +++ b/packages/unit/test/widget/draggable_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/drawer_test.dart b/packages/unit/test/widget/drawer_test.dart index 0d4707887a..9e10faabeb 100644 --- a/packages/unit/test/widget/drawer_test.dart +++ b/packages/unit/test/widget/drawer_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/duplicate_key_test.dart b/packages/unit/test/widget/duplicate_key_test.dart index 9040b6aee7..dec4f9be1d 100644 --- a/packages/unit/test/widget/duplicate_key_test.dart +++ b/packages/unit/test/widget/duplicate_key_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/flex_test.dart b/packages/unit/test/widget/flex_test.dart index 34a2710f91..3d0316ce9f 100644 --- a/packages/unit/test/widget/flex_test.dart +++ b/packages/unit/test/widget/flex_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/focus_test.dart b/packages/unit/test/widget/focus_test.dart index d270564a1f..0c51130eed 100644 --- a/packages/unit/test/widget/focus_test.dart +++ b/packages/unit/test/widget/focus_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/fractionally_sized_box_test.dart b/packages/unit/test/widget/fractionally_sized_box_test.dart index 148486b518..9147fd3c59 100644 --- a/packages/unit/test/widget/fractionally_sized_box_test.dart +++ b/packages/unit/test/widget/fractionally_sized_box_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/gesture_detector_test.dart b/packages/unit/test/widget/gesture_detector_test.dart index 030af3c5e6..d83f16a0b5 100644 --- a/packages/unit/test/widget/gesture_detector_test.dart +++ b/packages/unit/test/widget/gesture_detector_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/heroes_test.dart b/packages/unit/test/widget/heroes_test.dart index 92aa348a2e..25eb1e8647 100644 --- a/packages/unit/test/widget/heroes_test.dart +++ b/packages/unit/test/widget/heroes_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/homogeneous_viewport_test.dart b/packages/unit/test/widget/homogeneous_viewport_test.dart index 3f96271e90..85dd1ac3f2 100644 --- a/packages/unit/test/widget/homogeneous_viewport_test.dart +++ b/packages/unit/test/widget/homogeneous_viewport_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/input_test.dart b/packages/unit/test/widget/input_test.dart index f175e2b788..e1796a0c6e 100644 --- a/packages/unit/test/widget/input_test.dart +++ b/packages/unit/test/widget/input_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:mojo_services/keyboard/keyboard.mojom.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/packages/unit/test/widget/listener_test.dart b/packages/unit/test/widget/listener_test.dart index 804494b73c..65014fc606 100644 --- a/packages/unit/test/widget/listener_test.dart +++ b/packages/unit/test/widget/listener_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/mixed_viewport_test.dart b/packages/unit/test/widget/mixed_viewport_test.dart index f5532a8528..6bf63135f7 100644 --- a/packages/unit/test/widget/mixed_viewport_test.dart +++ b/packages/unit/test/widget/mixed_viewport_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/multichild_test.dart b/packages/unit/test/widget/multichild_test.dart index e2f7b3428d..bbd6be6e23 100644 --- a/packages/unit/test/widget/multichild_test.dart +++ b/packages/unit/test/widget/multichild_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/navigator_test.dart b/packages/unit/test/widget/navigator_test.dart index 88dd13bdcf..0252798dc9 100644 --- a/packages/unit/test/widget/navigator_test.dart +++ b/packages/unit/test/widget/navigator_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/pageable_list_test.dart b/packages/unit/test/widget/pageable_list_test.dart index 15823ec0ad..ce3e6358bb 100644 --- a/packages/unit/test/widget/pageable_list_test.dart +++ b/packages/unit/test/widget/pageable_list_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/parent_data_test.dart b/packages/unit/test/widget/parent_data_test.dart index 59af8bfe87..6307fd747a 100644 --- a/packages/unit/test/widget/parent_data_test.dart +++ b/packages/unit/test/widget/parent_data_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/positioned_test.dart b/packages/unit/test/widget/positioned_test.dart index d6bcb0ebde..8c12b36a14 100644 --- a/packages/unit/test/widget/positioned_test.dart +++ b/packages/unit/test/widget/positioned_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/animation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; diff --git a/packages/unit/test/widget/progress_indicator_test.dart b/packages/unit/test/widget/progress_indicator_test.dart index 9a5c971f8f..cbd5ac59ce 100644 --- a/packages/unit/test/widget/progress_indicator_test.dart +++ b/packages/unit/test/widget/progress_indicator_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/material.dart'; diff --git a/packages/unit/test/widget/render_object_widget_test.dart b/packages/unit/test/widget/render_object_widget_test.dart index 61e8944952..eaccd4be23 100644 --- a/packages/unit/test/widget/render_object_widget_test.dart +++ b/packages/unit/test/widget/render_object_widget_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/scrollable_list_hit_testing_test.dart b/packages/unit/test/widget/scrollable_list_hit_testing_test.dart index 96182d686b..a0023d096c 100644 --- a/packages/unit/test/widget/scrollable_list_hit_testing_test.dart +++ b/packages/unit/test/widget/scrollable_list_hit_testing_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/scrollable_list_horizontal_test.dart b/packages/unit/test/widget/scrollable_list_horizontal_test.dart index 739f9ec1f5..a6821739be 100644 --- a/packages/unit/test/widget/scrollable_list_horizontal_test.dart +++ b/packages/unit/test/widget/scrollable_list_horizontal_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/scrollable_list_vertical_test.dart b/packages/unit/test/widget/scrollable_list_vertical_test.dart index 7a1d3f42c1..c258b076a5 100644 --- a/packages/unit/test/widget/scrollable_list_vertical_test.dart +++ b/packages/unit/test/widget/scrollable_list_vertical_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/scrollable_list_with_inherited_test.dart b/packages/unit/test/widget/scrollable_list_with_inherited_test.dart index 53d7c712ad..4c08334874 100644 --- a/packages/unit/test/widget/scrollable_list_with_inherited_test.dart +++ b/packages/unit/test/widget/scrollable_list_with_inherited_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/set_state_test.dart b/packages/unit/test/widget/set_state_test.dart index f396a0778c..848a656550 100644 --- a/packages/unit/test/widget/set_state_test.dart +++ b/packages/unit/test/widget/set_state_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/shader_mask_test.dart b/packages/unit/test/widget/shader_mask_test.dart index 22c0360c71..784816ab8b 100644 --- a/packages/unit/test/widget/shader_mask_test.dart +++ b/packages/unit/test/widget/shader_mask_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'dart:ui' as ui; import 'package:flutter/painting.dart'; diff --git a/packages/unit/test/widget/size_observer_test.dart b/packages/unit/test/widget/size_observer_test.dart index 1ebb816c4a..300c903d85 100644 --- a/packages/unit/test/widget/size_observer_test.dart +++ b/packages/unit/test/widget/size_observer_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; diff --git a/packages/unit/test/widget/snack_bar_test.dart b/packages/unit/test/widget/snack_bar_test.dart index 881685f0df..bdcc96471f 100644 --- a/packages/unit/test/widget/snack_bar_test.dart +++ b/packages/unit/test/widget/snack_bar_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/stack_test.dart b/packages/unit/test/widget/stack_test.dart index 7f6dc31152..512feda229 100644 --- a/packages/unit/test/widget/stack_test.dart +++ b/packages/unit/test/widget/stack_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/stateful_component_test.dart b/packages/unit/test/widget/stateful_component_test.dart index c545744d64..45a116c587 100644 --- a/packages/unit/test/widget/stateful_component_test.dart +++ b/packages/unit/test/widget/stateful_component_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/stateful_components_test.dart b/packages/unit/test/widget/stateful_components_test.dart index 828611e4c1..8f67396cd0 100644 --- a/packages/unit/test/widget/stateful_components_test.dart +++ b/packages/unit/test/widget/stateful_components_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/syncing_test.dart b/packages/unit/test/widget/syncing_test.dart index 77afd31e4a..a2b2f28a05 100644 --- a/packages/unit/test/widget/syncing_test.dart +++ b/packages/unit/test/widget/syncing_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/tabs_test.dart b/packages/unit/test/widget/tabs_test.dart index 188bfad9e1..e4e64e93fd 100644 --- a/packages/unit/test/widget/tabs_test.dart +++ b/packages/unit/test/widget/tabs_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/test_widgets.dart b/packages/unit/test/widget/test_widgets.dart index 06caf1b45b..381368947e 100644 --- a/packages/unit/test/widget/test_widgets.dart +++ b/packages/unit/test/widget/test_widgets.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/transform_test.dart b/packages/unit/test/widget/transform_test.dart index b1e9afd3d3..95e0295eab 100644 --- a/packages/unit/test/widget/transform_test.dart +++ b/packages/unit/test/widget/transform_test.dart @@ -1,3 +1,7 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + import 'package:flutter/widgets.dart'; import 'package:test/test.dart'; diff --git a/packages/unit/test/widget/widget_tester.dart b/packages/unit/test/widget/widget_tester.dart index 88efb4f447..002d896b9c 100644 --- a/packages/unit/test/widget/widget_tester.dart +++ b/packages/unit/test/widget/widget_tester.dart @@ -1,3 +1,9 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'dart:ui' as ui; + import 'package:flutter/animation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; @@ -29,7 +35,10 @@ typedef Point SizeToPointFunction(Size size); class WidgetTester { WidgetTester._(FakeAsync async) : async = async, - clock = async.getClock(new DateTime.utc(2015, 1, 1)); + clock = async.getClock(new DateTime.utc(2015, 1, 1)) { + timeDilation = 1.0; + ui.window.onBeginFrame = null; + } final FakeAsync async; final Clock clock;