From 99f376dc4e07f43cdb3ade21dcbb1d80e40c538e Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Sun, 30 Nov 2008 06:40:15 -0600 Subject: [PATCH] jscript: Implement the String.bold() method. --- dlls/jscript/string.c | 4 ++-- dlls/jscript/tests/api.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c index 94f4733542c..426436bce5b 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -174,8 +174,8 @@ static HRESULT String_blink(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM static HRESULT String_bold(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + static const WCHAR boldtagW[] = {'B',0}; + return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, boldtagW); } /* ECMA-262 3rd Edition 15.5.4.5 */ diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 7668509a88c..4355d347ca2 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -287,6 +287,15 @@ ok(tmp === "test", "'test'.blink() = " + tmp); tmp = "test".blink(3); ok(tmp === "test", "'test'.blink(3) = " + tmp); +tmp = "".bold(); +ok(tmp === "", "''.bold() = " + tmp); +tmp = "".bold(3); +ok(tmp === "", "''.bold(3) = " + tmp); +tmp = "test".bold(); +ok(tmp === "test", "'test'.bold() = " + tmp); +tmp = "test".bold(3); +ok(tmp === "test", "'test'.bold(3) = " + tmp); + var arr = new Array(); ok(typeof(arr) === "object", "arr () is not object"); ok((arr.length === 0), "arr.length is not 0");