Module: wine Branch: master Commit: 424a3f3ffe671ce81355cb8334b03f8a9df04ac5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=424a3f3ffe671ce81355cb8334...
Author: Andrew Nguyen arethusa26@gmail.com Date: Sun Nov 30 06:40:37 2008 -0600
jscript: Implement the String.small() 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 5afbe46..862dfb0 100644 --- a/dlls/jscript/string.c +++ b/dlls/jscript/string.c @@ -866,8 +866,8 @@ static HRESULT String_slice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM static HRESULT String_small(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp) { - FIXME("\n"); - return E_NOTIMPL; + static const WCHAR smalltagW[] = {'S','M','A','L','L',0}; + return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, smalltagW); }
static HRESULT String_split(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index d8df87f..4b58e99 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -314,6 +314,15 @@ ok(tmp === "<I>test</I>", "'test'.italics() = " + tmp); tmp = "test".italics(3); ok(tmp === "<I>test</I>", "'test'.italics(3) = " + tmp);
+tmp = "".small(); +ok(tmp === "<SMALL></SMALL>", "''.small() = " + tmp); +tmp = "".small(3); +ok(tmp === "<SMALL></SMALL>", "''.small(3) = " + tmp); +tmp = "test".small(); +ok(tmp === "<SMALL>test</SMALL>", "'test'.small() = " + tmp); +tmp = "test".small(3); +ok(tmp === "<SMALL>test</SMALL>", "'test'.small(3) = " + tmp); + var arr = new Array(); ok(typeof(arr) === "object", "arr () is not object"); ok((arr.length === 0), "arr.length is not 0");