Commit ec665f1c authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Expose toString() for WineDOMTokenList.

parent 31883ce4
...@@ -6612,6 +6612,15 @@ static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token) ...@@ -6612,6 +6612,15 @@ static HRESULT WINAPI token_list_remove(IWineDOMTokenList *iface, BSTR token)
return token_list_add_remove(iface, token, TRUE); return token_list_add_remove(iface, token, TRUE);
} }
static HRESULT WINAPI token_list_toString(IWineDOMTokenList *iface, BSTR *String)
{
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
TRACE("(%p)->(%p)\n", token_list, String);
return IHTMLElement_get_className(token_list->element, String);
}
static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = { static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = {
token_list_QueryInterface, token_list_QueryInterface,
token_list_AddRef, token_list_AddRef,
...@@ -6622,6 +6631,7 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = { ...@@ -6622,6 +6631,7 @@ static const IWineDOMTokenListVtbl WineDOMTokenListVtbl = {
token_list_Invoke, token_list_Invoke,
token_list_add, token_list_add,
token_list_remove, token_list_remove,
token_list_toString
}; };
static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface) static inline struct token_list *token_list_from_DispatchEx(DispatchEx *iface)
......
...@@ -115,6 +115,8 @@ interface IWineDOMTokenList : IDispatch ...@@ -115,6 +115,8 @@ interface IWineDOMTokenList : IDispatch
HRESULT add([in] BSTR token); HRESULT add([in] BSTR token);
[id(2)] [id(2)]
HRESULT remove([in] BSTR token); HRESULT remove([in] BSTR token);
[id(3)]
HRESULT toString([retval, out] BSTR *String);
} }
} /* library MSHTML_private */ } /* library MSHTML_private */
...@@ -528,6 +528,7 @@ sync_test("classList", function() { ...@@ -528,6 +528,7 @@ sync_test("classList", function() {
classList.add("c"); classList.add("c");
ok(elem.className === "a b c 4", "(2) Expected className 'a b c 4', got " + elem.className); ok(elem.className === "a b c 4", "(2) Expected className 'a b c 4', got " + elem.className);
ok(("" + classList) === "a b c 4", "Expected classList value 'a b c 4', got " + classList); ok(("" + classList) === "a b c 4", "Expected classList value 'a b c 4', got " + classList);
ok(classList.toString() === "a b c 4", "Expected classList toString 'a b c 4', got " + classList.toString());
var exception = false var exception = false
...@@ -609,4 +610,5 @@ sync_test("classList", function() { ...@@ -609,4 +610,5 @@ sync_test("classList", function() {
elem.className = " testclass foobar "; elem.className = " testclass foobar ";
ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList); ok(("" + classList) === " testclass foobar ", "Expected classList value ' testclass foobar ', got " + classList);
ok(classList.toString() === " testclass foobar ", "Expected classList toString ' testclass foobar ', got " + classList.toString());
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment