A new test needs to exit early on non-internationalization builds.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/265513003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 129c58c4
...@@ -2,29 +2,31 @@ ...@@ -2,29 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
function overflow() { if ("Intl" in this) {
return overflow() + 1; function overflow() {
} return overflow() + 1;
Object.defineProperty = overflow; }
assertDoesNotThrow(function() { Intl.Collator.supportedLocalesOf("en"); }); Object.defineProperty = overflow;
assertDoesNotThrow(function() { Intl.Collator.supportedLocalesOf("en"); });
var date = new Date(Date.UTC(2004, 12, 25, 3, 0, 0)); var date = new Date(Date.UTC(2004, 12, 25, 3, 0, 0));
var options = { var options = {
weekday: "long", weekday: "long",
year: "numeric", year: "numeric",
month: "long", month: "long",
day: "numeric" day: "numeric"
}; };
Object.apply = overflow; Object.apply = overflow;
assertDoesNotThrow(function() { date.toLocaleDateString("de-DE", options); }); assertDoesNotThrow(function() { date.toLocaleDateString("de-DE", options); });
var options_incomplete = {}; var options_incomplete = {};
assertDoesNotThrow(function() { assertDoesNotThrow(function() {
date.toLocaleDateString("de-DE", options_incomplete); date.toLocaleDateString("de-DE", options_incomplete);
}); });
assertTrue(options_incomplete.hasOwnProperty("year")); assertTrue(options_incomplete.hasOwnProperty("year"));
assertDoesNotThrow(function() { date.toLocaleDateString("de-DE", undefined); }); assertDoesNotThrow(function() { date.toLocaleDateString("de-DE", undefined); });
assertDoesNotThrow(function() { date.toLocaleDateString("de-DE"); }); assertDoesNotThrow(function() { date.toLocaleDateString("de-DE"); });
assertThrows(function() { date.toLocaleDateString("de-DE", null); }, TypeError); assertThrows(function() { date.toLocaleDateString("de-DE", null); }, TypeError);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment