blob: a113d372a6b5285884951e9f21eb44092685dac6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta charset="utf-8">
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
if (window.internals) {
// Any language name with less than two characters is considered invalid, so we use "a" here.
window.internals.setUserPreferredLanguages(["a"]);
}
shouldThrow("new Intl.DateTimeFormat().resolvedOptions()", "'TypeError: failed to initialize DateTimeFormat due to invalid locale'");
shouldThrow("new Intl.NumberFormat().resolvedOptions()", "'TypeError: failed to initialize NumberFormat due to invalid locale'");
shouldThrow("new Intl.Collator().resolvedOptions()", "'TypeError: failed to initialize Collator due to invalid locale'");
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>