Skip to content

Commit

Permalink
[web] Unify line boundary expectations on web and non-web (#121006)
Browse files Browse the repository at this point in the history
* [web] Temporarily disable a line boundary test

* [web] Unify line boundary expectations on web and non-web
  • Loading branch information
mdebbar authored Feb 21, 2023
1 parent ebbc94b commit 902d86e
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions packages/flutter/test/rendering/paragraph_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1059,15 +1059,8 @@ void main() {
),
);
selection = paragraph.selections[0];
expect(selection.start, 4); // how [are you]
if (isBrowser && !isCanvasKit) {
// TODO(mdebbar): Remove this "if" once this engine PR lands:
// https://github.com/flutter/engine/pull/39693

// expect(selection.end, 12);
} else {
expect(selection.end, 11);
}
// how [are you]
expect(selection, const TextRange(start: 4, end: 11));

// Equivalent to sending shift + meta + arrow-left.
registrar.selectables[0].dispatchSelectionEvent(
Expand All @@ -1078,16 +1071,8 @@ void main() {
),
);
selection = paragraph.selections[0];
if (isBrowser && !isCanvasKit) {
// TODO(mdebbar): Remove this "if" once this engine PR lands:
// https://github.com/flutter/engine/pull/39693

// how [are you\n]
// expect(selection, const TextRange(start: 4, end: 12));
} else {
// [how ]are you
expect(selection, const TextRange(start: 0, end: 4));
}
// [how ]are you
expect(selection, const TextRange(start: 0, end: 4));
});

test('can granularly extend selection - document', () async {
Expand Down

0 comments on commit 902d86e

Please sign in to comment.