libtxt: make a paragraph selection test handle equivalent libtxt and blink output (#12606)

This commit is contained in:
Jason Simmons
2017-10-20 12:54:36 -07:00
committed by GitHub
parent 171b1b08c9
commit 5e8634a625

View File

@@ -51,7 +51,7 @@ void main() {
test('getBoxesForSelection control test', () {
final RenderParagraph paragraph = new RenderParagraph(
const TextSpan(text: _kText),
const TextSpan(text: _kText, style: const TextStyle(fontSize: 10.0)),
textDirection: TextDirection.ltr,
);
layout(paragraph);
@@ -66,7 +66,8 @@ void main() {
const TextSelection(baseOffset: 25, extentOffset: 50)
);
expect(boxes.length, equals(3));
expect(boxes.any((ui.TextBox box) => box.left == 250 && box.top == 0), isTrue);
expect(boxes.any((ui.TextBox box) => box.right == 100 && box.top == 10), isTrue);
});
test('getWordBoundary control test', () {