| Index: test/intl/date-format/format-is-bound.js
|
| diff --git a/src/extensions/i18n/header.js b/test/intl/date-format/format-is-bound.js
|
| similarity index 81%
|
| copy from src/extensions/i18n/header.js
|
| copy to test/intl/date-format/format-is-bound.js
|
| index 1c0a2d8874b5aa982ca2be2fb39f2ead1c4a9622..35bb57a22517eb42aef3f229bb0a4b4307185ab4 100644
|
| --- a/src/extensions/i18n/header.js
|
| +++ b/test/intl/date-format/format-is-bound.js
|
| @@ -26,16 +26,15 @@
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| // limitations under the License.
|
|
|
| -// ECMAScript 402 API implementation is broken into separate files for
|
| -// each service. The build system combines them together into one
|
| -// Intl namespace.
|
| +// Create default DateTimeFormat.
|
| +var dtf = new Intl.DateTimeFormat();
|
|
|
| -/**
|
| - * Intl object is a single object that has some named properties,
|
| - * all of which are constructors.
|
| - */
|
| -var Intl = (function() {
|
| +// Array we want to iterate, actual dates are not important.
|
| +var dateArray = [Date.now(), Date.now(), Date.now()];
|
|
|
| -'use strict';
|
| +// It shouldn't throw.
|
| +// The format() method should be properly bound to the dtf object.
|
| +dateArray.forEach(dtf.format);
|
|
|
| -var Intl = {};
|
| +// Formatting a date should work in a direct call.
|
| +dtf.format();
|
|
|