mshtml: Fix navigator.toString() in IE9+ compat modes.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
53cc70caa4
commit
4238faa0a0
|
@ -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());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue