summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/intl402/DateTimeFormat/taint-Object-prototype-dayPeriod.js
blob: 6b51db065de0edef240b8342b712aafd8e0ca1a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2019 Google Inc. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-createdatetimeformat
description: >
    Tests that the behavior of a Record is not affected by
    adversarial changes to Object.prototype.
includes: [testIntl.js]
features: [Intl.DateTimeFormat-dayPeriod]
---*/

taintProperties(["dayPeriod"]);

var locale = new Intl.DateTimeFormat(undefined, {localeMatcher: "lookup"}).resolvedOptions().locale;
assert(isCanonicalizedStructurallyValidLanguageTag(locale), "DateTimeFormat returns invalid locale " + locale + ".");

reportCompare(0, 0);