mshtml: Added IHTMLScriptElement::get_text implementation.
This commit is contained in:
parent
e9e09b66a0
commit
95f3c6402a
|
@ -199,8 +199,14 @@ static HRESULT WINAPI HTMLScriptElement_put_text(IHTMLScriptElement *iface, BSTR
|
||||||
static HRESULT WINAPI HTMLScriptElement_get_text(IHTMLScriptElement *iface, BSTR *p)
|
static HRESULT WINAPI HTMLScriptElement_get_text(IHTMLScriptElement *iface, BSTR *p)
|
||||||
{
|
{
|
||||||
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
|
HTMLScriptElement *This = impl_from_IHTMLScriptElement(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
nsAString nsstr;
|
||||||
return E_NOTIMPL;
|
nsresult nsres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
nsAString_Init(&nsstr, NULL);
|
||||||
|
nsres = nsIDOMHTMLScriptElement_GetText(This->nsscript, &nsstr);
|
||||||
|
return return_nsstr(nsres, &nsstr, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLScriptElement_put_defer(IHTMLScriptElement *iface, VARIANT_BOOL v)
|
static HRESULT WINAPI HTMLScriptElement_put_defer(IHTMLScriptElement *iface, VARIANT_BOOL v)
|
||||||
|
|
|
@ -3559,6 +3559,19 @@ static void _test_link_type(unsigned line, IHTMLElement *elem, const char *v)
|
||||||
IHTMLLinkElement_Release(link);
|
IHTMLLinkElement_Release(link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define test_script_text(a,b) _test_script_text(__LINE__,a,b)
|
||||||
|
static void _test_script_text(unsigned line, IHTMLScriptElement *script, const char *extext)
|
||||||
|
{
|
||||||
|
BSTR str;
|
||||||
|
HRESULT hres;
|
||||||
|
|
||||||
|
str = (void*)0xdeadbeef;
|
||||||
|
hres = IHTMLScriptElement_get_text(script, &str);
|
||||||
|
ok_(__FILE__,line)(hres == S_OK, "get_text failed: %08x\n", hres);
|
||||||
|
ok(!strcmp_wa(str, extext), "text = %s, expected \"%s\"\n", wine_dbgstr_w(str), extext);
|
||||||
|
SysFreeString(str);
|
||||||
|
}
|
||||||
|
|
||||||
#define link_put_type(a,b) _link_put_type(__LINE__,a,b)
|
#define link_put_type(a,b) _link_put_type(__LINE__,a,b)
|
||||||
static void _link_put_type(unsigned line, IHTMLElement *elem, const char *v)
|
static void _link_put_type(unsigned line, IHTMLElement *elem, const char *v)
|
||||||
{
|
{
|
||||||
|
@ -5822,9 +5835,10 @@ static void test_elems(IHTMLDocument2 *doc)
|
||||||
hres = IHTMLScriptElement_get_type(script, &type);
|
hres = IHTMLScriptElement_get_type(script, &type);
|
||||||
ok(hres == S_OK, "get_type failed: %08x\n", hres);
|
ok(hres == S_OK, "get_type failed: %08x\n", hres);
|
||||||
ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", wine_dbgstr_w(type));
|
ok(!strcmp_wa(type, "text/javascript"), "Unexpected type %s\n", wine_dbgstr_w(type));
|
||||||
|
|
||||||
SysFreeString(type);
|
SysFreeString(type);
|
||||||
|
|
||||||
|
test_script_text(script, "<!--\nfunction Testing() {}\n// -->\n");
|
||||||
|
|
||||||
/* test defer */
|
/* test defer */
|
||||||
hres = IHTMLScriptElement_put_defer(script, VARIANT_TRUE);
|
hres = IHTMLScriptElement_put_defer(script, VARIANT_TRUE);
|
||||||
ok(hres == S_OK, "put_defer failed: %08x\n", hres);
|
ok(hres == S_OK, "put_defer failed: %08x\n", hres);
|
||||||
|
|
Loading…
Reference in New Issue