vaadin / vaadin-date-picker-flow

Vaadin Flow Java API for vaadin/vaadin-date-picker Web Component
https://vaadin.com/components/vaadin-date-picker
Other
1 stars 11 forks source link

Update to Chrome 73 breaks the Locale test #165

Closed ZheSun88 closed 5 years ago

ZheSun88 commented 5 years ago

Since Chrome 73, one locale test started to fail consistently.

expected behavior

when passing an invalid locale to the component, there will be a client warning The locale is not supported, use default locale setting(en-US).

actual behavior

No warning has been thrown.

ZheSun88 commented 5 years ago

The problem with this one is:

the Locale.toLanguageTag() formats the wrong locale ("i-i") to "x-lvariant-i" (according to its javadoc, https://docs.oracle.com/javase/7/docs/api/java/util/Locale.html#toLanguageTag())

after update to Chrome 73, Date().toLocaleDateString(locale) doesn't report error for this kind of locale (x-lvariant-i).

so far, it is only found in chrome. not in Firefox or Edge or IE11.

fired an issue for chrome https://bugs.chromium.org/p/chromium/issues/detail?id=943544