Gabriel Ivăncescu : mshtml: Implement HTMLWindow's toString properly.

Alexandre Julliard julliard at winehq.org
Thu Oct 7 16:21:23 CDT 2021


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

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Thu Oct  7 16:52:32 2021 +0300

mshtml: Implement HTMLWindow's toString properly.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/htmlwindow.c          | 2 +-
 dlls/mshtml/tests/documentmode.js | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 2dfa8796c01..2d4cf68447e 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -1457,7 +1457,7 @@ static HRESULT WINAPI HTMLWindow2_toString(IHTMLWindow2 *iface, BSTR *String)
     if(!String)
         return E_INVALIDARG;
 
-    *String = SysAllocString(L"[object]");
+    *String = SysAllocString(L"[object Window]");
     return *String ? S_OK : E_OUTOFMEMORY;
 }
 
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index 33962674e4a..a392ae43274 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -222,6 +222,7 @@ sync_test("builtin_toString", function() {
     test("styleSheetRules", sheet.rules, "MSCSSRuleList");
     test("styleSheets", document.styleSheets, "StyleSheetList");
     test("textRange", txtRange, "TextRange");
+    test("window", window, "Window", "[object Window]");
     test("xmlHttpRequest", new XMLHttpRequest(), "XMLHttpRequest");
     if(v < 10) {
         test("namespaces", document.namespaces, "MSNamespaceInfoCollection");




More information about the wine-cvs mailing list