mozExtensions.js (709B)
1 // |reftest| skip-if(!this.hasOwnProperty("Intl")||!this.hasOwnProperty("addIntlExtras")) 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 let mozIntl = {}; 7 addIntlExtras(mozIntl); 8 9 // Pattern 10 11 var dtf = new Intl.DateTimeFormat("en-US", {pattern: "HH:mm MM/dd/YYYY"}); 12 var mozDtf = new mozIntl.DateTimeFormat("en-US", {pattern: "HH:mm MM/dd/YYYY"}); 13 14 assertEq(dtf.resolvedOptions().hasOwnProperty('pattern'), false); 15 assertEq(mozDtf.resolvedOptions().pattern, "HH:mm MM/dd/YYYY"); 16 17 if (typeof reportCompare === "function") 18 reportCompare(0, 0, 'ok');