Commit e0de3b6d authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

Fix android test breakage due to lack of locale

Only run the test when locale 'bn' is supported

Bug: v8:9100
Change-Id: I455d77a7fb7495f1f866211084cdb68fceb8c871
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2130069
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66956}
parent 3b442f96
......@@ -67,8 +67,6 @@
'default_locale': [SKIP],
# Unable to change locale and TZ on Android:
'regress-7770': [SKIP],
# 'bn' locale is not included in Android.
'relative-time-format/resolved-options-nu-extended': [FAIL],
}], # 'system == android'
]
......@@ -6,21 +6,25 @@
// Split from test/intl/relative-time-format/resolved-options-nu.js
// because Android not yet include bn locale data.
// For locale default the numberingSystem to other than 'latn'
assertEquals(
"beng",
new Intl.RelativeTimeFormat("bn").resolvedOptions().numberingSystem
);
// Only test if the browser support 'bn' locale
if (Intl.RelativeTimeFormat.supportedLocalesOf(["bn"]).length > 0) {
// For locale default the numberingSystem to other than 'latn'
assertEquals(
"beng",
new Intl.RelativeTimeFormat("bn").resolvedOptions().numberingSystem
);
// For locale which default others but use -u-nu-latn to change to 'latn' numberingSystem
assertEquals(
"latn",
new Intl.RelativeTimeFormat("bn-u-nu-latn").resolvedOptions()
.numberingSystem
);
// For locale use -u-nu- with invalid value still back to default.
assertEquals(
"beng",
new Intl.RelativeTimeFormat("bn-u-nu-abcd").resolvedOptions()
.numberingSystem
);
// For locale which default others but use -u-nu-latn to change to 'latn'
// numberingSystem
assertEquals(
"latn",
new Intl.RelativeTimeFormat("bn-u-nu-latn").resolvedOptions()
.numberingSystem
);
// For locale use -u-nu- with invalid value still back to default.
assertEquals(
"beng",
new Intl.RelativeTimeFormat("bn-u-nu-abcd").resolvedOptions()
.numberingSystem
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment