Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "Revert "Update text editing tests (#37642)" (#37653)"
This reverts commit e56ed93.
  • Loading branch information
Harry Terkelsen authored Nov 16, 2022
commit 69d8b481bf1f21110e9457b644d16e2c02bd9d9f
9 changes: 5 additions & 4 deletions lib/web_ui/test/text_editing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2565,10 +2565,9 @@ Future<void> testMain() async {
expect(input.style.backgroundColor, 'transparent');
expect(input.style.caretColor, 'transparent');
expect(input.style.outline, 'none');
expect(input.style.border, 'none');
expect(input.style.border.split(' '), contains('none'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the actual value? I can't tell why the split is necessary. Maybe leave a comment with an explanation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the expectations

expect(input.style.textShadow, 'none');
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
}, skip: isFirefox);
});

test('prevents effect of (forced-colors: active)', () {
editingStrategy!.enable(
Expand All @@ -2579,7 +2578,9 @@ Future<void> testMain() async {

final DomHTMLElement input = editingStrategy!.activeDomElement;
expect(input.style.getPropertyValue('forced-color-adjust'), 'none');
// TODO(hterkelsen): https://github.com/flutter/flutter/issues/115327
// TODO(hterkelsen): Firefox does not support forced-color-adjust even
// though it supports forced-colors. Safari doesn't support forced-colors
// so this isn't a problem there.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still run the test and just alter expectations on different browsers? The prod code will run on all browsers, it just produces different results.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on Firefox and Safari we would be testing that 'forced-color-adjust' is not set even though we try to set it

}, skip: isFirefox || isSafari);
});
}
Expand Down