| // Copyright 2012 Mozilla Corporation. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| description: Tests that the this-value is ignored in DateTimeFormat. |
| author: Norbert Lindenberg |
| testWithIntlConstructors(function (Constructor) { |
| // variant 1: use constructor in a "new" expression |
| newObj = Intl.DateTimeFormat.call(obj); |
| $ERROR("DateTimeFormat object created with \"new\" was not ignored as this-value."); |
| // variant 2: use constructor as a function |
| newObj = Intl.DateTimeFormat.call(obj); |
| $ERROR("DateTimeFormat object created with constructor as function was not ignored as this-value."); |