summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/js/navigator-language.html
blob: a433275c9d5320f86854ef02dd0591c9d0ea37b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description(
    "<pre>Check return value of navigator.language."
);

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.setPOSIXLocale("en_US.iso88591");
}

var language = navigator.language.toLowerCase();
if (language.length == 2)
    shouldBe("language", "'en'");
else
    shouldBe("language", "'en-us'");
</script>
</body>
</html>