2018-04-27 09:20:45 +02:00
|
|
|
// Copyright 2018 Igalia, S.L. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2018-05-04 19:49:37 +02:00
|
|
|
esid: sec-intl.locale
|
2018-04-27 09:20:45 +02:00
|
|
|
description: >
|
|
|
|
Verifies the NewTarget check for Intl.Locale.
|
|
|
|
info: |
|
|
|
|
Intl.Locale( tag [, options] )
|
2018-05-04 19:49:37 +02:00
|
|
|
|
2018-04-27 09:20:45 +02:00
|
|
|
1. If NewTarget is undefined, throw a TypeError exception.
|
|
|
|
features: [Intl.Locale]
|
|
|
|
---*/
|
|
|
|
|
2018-05-04 19:49:37 +02:00
|
|
|
assert.throws(TypeError, function() {
|
|
|
|
Intl.Locale();
|
2018-10-03 16:24:38 +02:00
|
|
|
}, 'Intl.Locale() throws TypeError');
|
2018-05-04 19:49:37 +02:00
|
|
|
|
|
|
|
assert.throws(TypeError, function() {
|
|
|
|
Intl.Locale("en");
|
2018-10-03 16:24:38 +02:00
|
|
|
}, 'Intl.Locale("en") throws TypeError');
|