Commit 4238faa0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fix navigator.toString() in IE9+ compat modes.

parent 53cc70ca
......@@ -1315,7 +1315,8 @@ static HRESULT WINAPI OmNavigator_toString(IOmNavigator *iface, BSTR *String)
if(!String)
return E_INVALIDARG;
*String = SysAllocString(L"[object]");
*String = SysAllocString(dispex_compat_mode(&This->dispex) < COMPAT_MODE_IE9
? L"[object]" : L"[object Navigator]");
return *String ? S_OK : E_OUTOFMEMORY;
}
......
......@@ -375,4 +375,6 @@ sync_test("navigator", function() {
ok(navigator.appCodeName === "Mozilla", "appCodeName = " + navigator.appCodeName);
ok(navigator.appName === (v < 11 ? "Microsoft Internet Explorer" : "Netscape"),
"appName = " + navigator.appName);
ok(navigator.toString() === (v < 9 ? "[object]" : "[object Navigator]"),
"navigator.toString() = " + navigator.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