mshtml: Implement HTMLWindow's toString properly.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2021-10-07 16:52:32 +03:00 committed by Alexandre Julliard
parent 8b86429dd7
commit de00887d2c
2 changed files with 2 additions and 1 deletions

View File

@ -1457,7 +1457,7 @@ static HRESULT WINAPI HTMLWindow2_toString(IHTMLWindow2 *iface, BSTR *String)
if(!String) if(!String)
return E_INVALIDARG; return E_INVALIDARG;
*String = SysAllocString(L"[object]"); *String = SysAllocString(L"[object Window]");
return *String ? S_OK : E_OUTOFMEMORY; return *String ? S_OK : E_OUTOFMEMORY;
} }

View File

@ -222,6 +222,7 @@ sync_test("builtin_toString", function() {
test("styleSheetRules", sheet.rules, "MSCSSRuleList"); test("styleSheetRules", sheet.rules, "MSCSSRuleList");
test("styleSheets", document.styleSheets, "StyleSheetList"); test("styleSheets", document.styleSheets, "StyleSheetList");
test("textRange", txtRange, "TextRange"); test("textRange", txtRange, "TextRange");
test("window", window, "Window", "[object Window]");
test("xmlHttpRequest", new XMLHttpRequest(), "XMLHttpRequest"); test("xmlHttpRequest", new XMLHttpRequest(), "XMLHttpRequest");
if(v < 10) { if(v < 10) {
test("namespaces", document.namespaces, "MSNamespaceInfoCollection"); test("namespaces", document.namespaces, "MSNamespaceInfoCollection");