Fix tests to use Ahem, and helpful changes around that (#9332)

* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
This commit is contained in:
Ian Hickson
2017-04-12 13:33:02 -07:00
committed by GitHub
parent c12c019bcc
commit 2a54524337
28 changed files with 435 additions and 286 deletions

View File

@@ -15,7 +15,8 @@ When the exception was thrown, this was the stack:
<<skip until matching line>>
\(elided .+\)
The test description was:
TestAsyncUtils - custom guarded sections
════════════════════════════════════════════════════════════════════════════════════════════════════
.*(this line has more of the test framework's output)?
Test failed\. See exception logs above\.

View File

@@ -14,7 +14,8 @@ When the exception was thrown, this was the stack:
<<skip until matching line>>
(elided [0-9]+ frames from .+)
The test description was:
TestAsyncUtils - handling unguarded async helper functions
════════════════════════════════════════════════════════════════════════════════════════════════════
.*..:.. \+0 -1: - TestAsyncUtils - handling unguarded async helper functions *
Test failed. See exception logs above.

View File

@@ -22,7 +22,7 @@ Future<Null> main() async {
// This allows us to call onBeginFrame even when the engine didn't request it,
// and have it actually do something:
final LiveTestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
binding.allowAllFrames = true;
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
final Stopwatch watch = new Stopwatch();
int iterations = 0;

View File

@@ -21,7 +21,7 @@ Future<Null> main() async {
// This allows us to call onBeginFrame even when the engine didn't request it,
// and have it actually do something:
final LiveTestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
binding.allowAllFrames = true;
binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;
final Stopwatch watch = new Stopwatch();
int iterations = 0;

View File

@@ -108,9 +108,9 @@ void createFooter(String footerPath) {
void sanityCheckDocs() {
final List<String> canaries = <String>[
'$kDocRoot/api/dart-io/File-class.html',
'$kDocRoot/api/dart-ui/Canvas-class.html',
'$kDocRoot/api/dart-ui/Canvas/drawRect.html',
'$kDocRoot/api/dart.io/File-class.html',
'$kDocRoot/api/dart_ui/Canvas-class.html',
'$kDocRoot/api/dart_ui/Canvas/drawRect.html',
'$kDocRoot/api/flutter_test/WidgetTester/pumpWidget.html',
'$kDocRoot/api/material/Material-class.html',
'$kDocRoot/api/material/Tooltip-class.html',