Andrew Nguyen : jscript: Implement the String.blink() method.

Alexandre Julliard julliard at winehq.org
Tue Dec 2 11:02:11 CST 2008


Module: wine
Branch: master
Commit: a8dff20f2ea793eebba186919b9e3c8a384bb593
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a8dff20f2ea793eebba186919b9e3c8a384bb593

Author: Andrew Nguyen <arethusa26 at gmail.com>
Date:   Sun Nov 30 06:40:08 2008 -0600

jscript: Implement the String.blink() 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 4cfc082..94f4733 100644
--- a/dlls/jscript/string.c
+++ b/dlls/jscript/string.c
@@ -167,8 +167,8 @@ static HRESULT String_big(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
 static HRESULT String_blink(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
         VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
 {
-    FIXME("\n");
-    return E_NOTIMPL;
+    static const WCHAR blinktagW[] = {'B','L','I','N','K',0};
+    return do_attributeless_tag_format(dispex, lcid, flags, dp, retv, ei, sp, blinktagW);
 }
 
 static HRESULT String_bold(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index e0d7025..7668509 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -278,6 +278,15 @@ ok(tmp === "<BIG>test</BIG>", "'test'.big() = " + tmp);
 tmp = "test".big(3);
 ok(tmp === "<BIG>test</BIG>", "'test'.big(3) = " + tmp);
 
+tmp = "".blink();
+ok(tmp === "<BLINK></BLINK>", "''.blink() = " + tmp);
+tmp = "".blink(3);
+ok(tmp === "<BLINK></BLINK>", "''.blink(3) = " + tmp);
+tmp = "test".blink();
+ok(tmp === "<BLINK>test</BLINK>", "'test'.blink() = " + tmp);
+tmp = "test".blink(3);
+ok(tmp === "<BLINK>test</BLINK>", "'test'.blink(3) = " + tmp);
+
 var arr = new Array();
 ok(typeof(arr) === "object", "arr () is not object");
 ok((arr.length === 0), "arr.length is not 0");




More information about the wine-cvs mailing list