Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52969 Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/tests/es5.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/tests/es5.js b/dlls/mshtml/tests/es5.js index 8238e5d..7545ef2 100644 --- a/dlls/mshtml/tests/es5.js +++ b/dlls/mshtml/tests/es5.js @@ -150,10 +150,14 @@ sync_test("Number toLocaleString", function() { ];
if(external.isEnglish) { - for(var i = 0; i < tests.length; i++) { - r = Number.prototype.toLocaleString.call(tests[i][0]); - ok(r === tests[i][1], "[" + i + "] got " + r); - } + /* Some recent Win8.1 updates have old jscript behavior */ + if(Number.prototype.toLocaleString.call(0.0) === "0.00") + win_skip("skipping tests due to old behavior"); + else + for(var i = 0; i < tests.length; i++) { + r = Number.prototype.toLocaleString.call(tests[i][0]); + ok(r === tests[i][1], "[" + i + "] got " + r); + } }
try { @@ -161,21 +165,21 @@ sync_test("Number toLocaleString", function() { ok(false, "expected exception calling it on string"); }catch(ex) { var n = ex.number >>> 0; - ok(n === JS_E_WRONG_THIS, "called on string threw " + n); + ok(n === JS_E_WRONG_THIS || n === JS_E_NUMBER_EXPECTED /* newer Win8.1 */, "called on string threw " + n); } try { Number.prototype.toLocaleString.call(undefined); ok(false, "expected exception calling it on undefined"); }catch(ex) { var n = ex.number >>> 0; - ok(n === JS_E_WRONG_THIS, "called on undefined threw " + n); + ok(n === JS_E_WRONG_THIS || n === JS_E_NUMBER_EXPECTED /* newer Win8.1 */, "called on undefined threw " + n); } try { Number.prototype.toLocaleString.call(external.nullDisp); ok(false, "expected exception calling it on nullDisp"); }catch(ex) { var n = ex.number >>> 0; - ok(n === JS_E_WRONG_THIS, "called on nullDisp threw " + n); + ok(n === JS_E_WRONG_THIS || n === JS_E_NUMBER_EXPECTED /* newer Win8.1 */, "called on nullDisp threw " + n); } });