Change mjsunit tests to work with and without the i18n extension

BUG=v8:2745
R=jkummerow@chromium.org

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

Patch from Jochen Eisinger <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 84833a59
...@@ -150,7 +150,7 @@ assertTrue(isNaN(l.getUTCMilliseconds())); ...@@ -150,7 +150,7 @@ assertTrue(isNaN(l.getUTCMilliseconds()));
// date without the timezone information. // date without the timezone information.
function testToLocaleTimeString() { function testToLocaleTimeString() {
var d = new Date(); var d = new Date();
var s = d.toLocaleTimeString(); var s = d.toLocaleTimeString("en-GB");
assertEquals(8, s.length); assertEquals(8, s.length);
} }
......
...@@ -61,9 +61,8 @@ for (i = 0; i < scripts.length; i++) { ...@@ -61,9 +61,8 @@ for (i = 0; i < scripts.length; i++) {
// This has to be updated if the number of native scripts change. // This has to be updated if the number of native scripts change.
assertEquals(16, named_native_count); assertEquals(16, named_native_count);
// If no snapshot is used, only the 'gc' extension is loaded. // Only the 'gc' and (depending on flags) the 'i18n' extensions are loaded.
// If snapshot is used, all extensions are cached in the snapshot. assertTrue(extension_count == 1 || extension_count == 2);
assertTrue(extension_count == 1 || extension_count == 5);
// This script and mjsunit.js has been loaded. If using d8, d8 loads // This script and mjsunit.js has been loaded. If using d8, d8 loads
// a normal script during startup too. // a normal script during startup too.
assertTrue(normal_count == 2 || normal_count == 3); assertTrue(normal_count == 2 || normal_count == 3);
......
...@@ -151,6 +151,7 @@ var reducing_functions = ...@@ -151,6 +151,7 @@ var reducing_functions =
function checkExpectedMessage(e) { function checkExpectedMessage(e) {
assertTrue(e.message.indexOf("called on null or undefined") >= 0 || assertTrue(e.message.indexOf("called on null or undefined") >= 0 ||
e.message.indexOf("invoked on undefined or null value") >= 0 ||
e.message.indexOf("Cannot convert null to object") >= 0); e.message.indexOf("Cannot convert null to object") >= 0);
} }
......
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