Skip to content

Commit 4459223

Browse files
Roll engine to 33b8817 (flutter#14832)
libtxt is now the default text renderer
1 parent ed84fb9 commit 4459223

File tree

9 files changed

+32
-8
lines changed

9 files changed

+32
-8
lines changed

bin/internal/engine.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ead227f118077d1f2b57842a32abaf105b573b8a
1+
33b88173f3820690169348859bbdc29133179e0b

packages/flutter/test/material/text_field_test.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// found in the LICENSE file.
44

55
import 'dart:async';
6+
import 'dart:io' show Platform;
67
import 'dart:ui' show SemanticsFlag;
78

89
import 'package:flutter/material.dart';
@@ -735,7 +736,9 @@ void main() {
735736
expect(newFirstPos.dy, firstPos.dy);
736737
expect(inputBox.hitTest(new HitTestResult(), position: inputBox.globalToLocal(newFirstPos)), isTrue);
737738
expect(inputBox.hitTest(new HitTestResult(), position: inputBox.globalToLocal(newFourthPos)), isFalse);
738-
});
739+
},
740+
// This test does not run as expected in the MacOS environment on Travis
741+
skip: runningOnTravis && Platform.isMacOS);
739742

740743
testWidgets('TextField smoke test', (WidgetTester tester) async {
741744
String textFieldValue;
@@ -1746,8 +1749,8 @@ void main() {
17461749
// --------- rowBottomY
17471750

17481751
final double rowBottomY = tester.getBottomLeft(find.byType(Row)).dy;
1749-
expect(tester.getBottomLeft(find.byKey(keyA)).dy, rowBottomY - 4.0);
1750-
expect(tester.getBottomLeft(find.text('abc')).dy, rowBottomY - 2.0);
1752+
expect(tester.getBottomLeft(find.byKey(keyA)).dy, closeTo(rowBottomY - 4.0, 0.001));
1753+
expect(tester.getBottomLeft(find.text('abc')).dy, closeTo(rowBottomY - 2.0, 0.001));
17511754
expect(tester.getBottomLeft(find.byKey(keyB)).dy, rowBottomY);
17521755
});
17531756

packages/flutter/test/painting/text_painter_rtl_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ void main() {
319319
const TextBox.fromLTRBD(0.0, 10.0, 10.0, 20.0, TextDirection.rtl), // Alef
320320
],
321321
);
322-
}, skip: Platform.isWindows); // Ahem-based tests don't yet quite work on Windows
322+
},
323+
// Ahem-based tests don't yet quite work on Windows or the MacOS environment in Travis
324+
skip: Platform.isWindows || (runningOnTravis && Platform.isMacOS));
323325

324326
test('TextPainter - line wrap mid-word', () {
325327
final TextPainter painter = new TextPainter()

packages/flutter/test/rendering/paragraph_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ void main() {
6969

7070
expect(boxes.any((ui.TextBox box) => box.left == 250 && box.top == 0), isTrue);
7171
expect(boxes.any((ui.TextBox box) => box.right == 100 && box.top == 10), isTrue);
72-
}, skip: Platform.isWindows); // Ahem-based tests don't yet quite work on Windows
72+
},
73+
// Ahem-based tests don't yet quite work on Windows or the MacOS environment in Travis
74+
skip: Platform.isWindows || (runningOnTravis && Platform.isMacOS));
7375

7476
test('getWordBoundary control test', () {
7577
final RenderParagraph paragraph = new RenderParagraph(

packages/flutter/test/widgets/baseline_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ void main() {
3838
),
3939
);
4040
expect(tester.renderObject<RenderBox>(find.text('X')).size, const Size(100.0, 100.0));
41-
expect(tester.renderObject<RenderBox>(find.byType(Baseline)).size, const Size(100.0, 200.0));
41+
expect(tester.renderObject<RenderBox>(find.byType(Baseline)).size,
42+
within<Size>(from: const Size(100.0, 200.0), distance: 0.001));
4243
});
4344
}

packages/flutter/test/widgets/wrap_test.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ void main() {
825825
),
826826
);
827827
expect(tester.renderObject<RenderBox>(find.text('X')).size, const Size(100.0, 100.0));
828-
expect(tester.renderObject<RenderBox>(find.byType(Baseline)).size, const Size(100.0, 200.0));
828+
expect(tester.renderObject<RenderBox>(find.byType(Baseline)).size,
829+
within<Size>(from: const Size(100.0, 200.0), distance: 0.001));
829830
});
830831
}

packages/flutter_test/lib/flutter_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export 'src/controller.dart';
1313
export 'src/finders.dart';
1414
export 'src/matchers.dart';
1515
export 'src/nonconst.dart';
16+
export 'src/platform.dart';
1617
export 'src/stack_manipulation.dart';
1718
export 'src/test_async_utils.dart';
1819
export 'src/test_pointer.dart';

packages/flutter_test/lib/src/matchers.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ const Map<Type, AnyDistanceFunction> _kStandardDistanceFunctions = const <Type,
622622
int: _intDistance,
623623
double: _doubleDistance,
624624
Rect: _rectDistance,
625+
Size: _sizeDistance,
625626
};
626627

627628
int _intDistance(int a, int b) => (b - a).abs();
@@ -642,6 +643,11 @@ double _rectDistance(Rect a, Rect b) {
642643
return delta;
643644
}
644645

646+
double _sizeDistance(Size a, Size b) {
647+
final Offset delta = b - a;
648+
return math.sqrt(delta.dx * delta.dx + delta.dy * delta.dy);
649+
}
650+
645651
/// Asserts that two values are within a certain distance from each other.
646652
///
647653
/// The distance is computed by a [DistanceFunction].
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright 2018 The Chromium Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'dart:io';
6+
7+
/// Whether the test is running in a Travis CI environment.
8+
bool get runningOnTravis => Platform.environment['TRAVIS'] == 'true';

0 commit comments

Comments
 (0)