michael@0: // Copyright 2012 Mozilla Corporation. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * @description Tests that the behavior of a Record is not affected by adversarial michael@0: * changes to Object.prototype. michael@0: * @author Norbert Lindenberg michael@0: */ michael@0: michael@0: $INCLUDE("testIntl.js"); michael@0: michael@0: taintProperties(["locale", "extension", "extensionIndex"]); michael@0: michael@0: testWithIntlConstructors(function (Constructor) { michael@0: var locale = new Constructor(undefined, {localeMatcher: "lookup"}).resolvedOptions().locale; michael@0: if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { michael@0: $ERROR("Constructor returns invalid locale " + locale + "."); michael@0: } michael@0: michael@0: return true; michael@0: }); michael@0: