AcceptLanguageTest#testAcceptLanguage* depends on actual device locale |
||
Issue descriptionI tried running AcceptLanguageTest#testAcceptLanguage* tests, and was surprised to find that these fail on master branch if my device is in a non-English locale. Even if my device *is* in US English, it still fails tests if I have other languages in my "language preferences" list. BTW I think Nougat introduced locale lists. Prior to that, the device could only be in a single locale at a time. We should see if we can remove a dependency on the actual device locale if possible, or we should comment the tests to indicate this is a dependency. I think this line [1] is supposed to fix this for pre-N devices (haven't confirmed though), although this is definitely broken for N+. [1] https://cs.chromium.org/chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java?l=91&rcl=4f9c35c3635144e2c2d1b87d09cbcf076d138b66
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a540d48c6f40a4a17d3fa14f6ae7f50c9f0a00fb commit a540d48c6f40a4a17d3fa14f6ae7f50c9f0a00fb Author: Changwan Ryu <changwan@google.com> Date: Tue Nov 06 00:26:32 2018 Fix AcceptLanguageTest for N+ The test fails when non-English locale is used, or even when there is a secondary language set in the language preferences. Nougat introduced local lists, so checking the default locale isn't enough to ensure that there isn't any secondary locale, and setting the default locale does not remove the secondary locale. This CL provides a separate code path for multiple locale check in N+. Bug: 901230 Change-Id: I181378e79888a36d47db7c1c3ca360573fdec235 Reviewed-on: https://chromium-review.googlesource.com/c/1318670 Reviewed-by: Nate Fischer <ntfschr@chromium.org> Commit-Queue: Changwan Ryu <changwan@chromium.org> Cr-Commit-Position: refs/heads/master@{#605536} [modify] https://crrev.com/a540d48c6f40a4a17d3fa14f6ae7f50c9f0a00fb/android_webview/javatests/src/org/chromium/android_webview/test/AcceptLanguageTest.java
,
Nov 6
|
||
►
Sign in to add a comment |
||
Comment 1 by changwan@chromium.org
, Nov 2