Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f06f3cf4
Commit
f06f3cf4
authored
Jul 24, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Added more test and fixes.
parent
5b27ce23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
120 additions
and
3 deletions
+120
-3
webbrowser.c
dlls/shdocvw/tests/webbrowser.c
+117
-0
webbrowser.c
dlls/shdocvw/webbrowser.c
+3
-3
No files found.
dlls/shdocvw/tests/webbrowser.c
View file @
f06f3cf4
...
@@ -693,6 +693,122 @@ static void test_ClassInfo(IUnknown *unk)
...
@@ -693,6 +693,122 @@ static void test_ClassInfo(IUnknown *unk)
IProvideClassInfo2_Release
(
class_info
);
IProvideClassInfo2_Release
(
class_info
);
}
}
static
void
test_ie_funcs
(
IUnknown
*
unk
)
{
IWebBrowser2
*
wb
;
VARIANT_BOOL
b
;
int
i
;
long
hwnd
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IWebBrowser2
,
(
void
**
)
&
wb
);
ok
(
hres
==
S_OK
,
"Could not get IWebBrowser2 interface: %08lx
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
/* HWND */
hwnd
=
0xdeadbeef
;
hres
=
IWebBrowser2_get_HWND
(
wb
,
&
hwnd
);
ok
(
hres
==
E_FAIL
,
"get_HWND failed: %08lx, expected E_FAIL
\n
"
,
hres
);
ok
(
hwnd
==
0
,
"unexpected hwnd %lx
\n
"
,
hwnd
);
/* MenuBar */
hres
=
IWebBrowser2_get_MenuBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_MenuBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_MenuBar
(
wb
,
VARIANT_FALSE
);
ok
(
hres
==
S_OK
,
"put_MenuBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_MenuBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_MenuBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_MenuBar
(
wb
,
100
);
ok
(
hres
==
S_OK
,
"put_MenuBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_MenuBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_MenuBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
/* AddressBar */
hres
=
IWebBrowser2_get_AddressBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_AddressBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_AddressBar
(
wb
,
VARIANT_FALSE
);
ok
(
hres
==
S_OK
,
"put_AddressBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_AddressBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_MenuBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_AddressBar
(
wb
,
100
);
ok
(
hres
==
S_OK
,
"put_AddressBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_AddressBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_AddressBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_AddressBar
(
wb
,
VARIANT_TRUE
);
ok
(
hres
==
S_OK
,
"put_MenuBar failed: %08lx
\n
"
,
hres
);
/* StatusBar */
hres
=
IWebBrowser2_get_StatusBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_StatusBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_StatusBar
(
wb
,
VARIANT_TRUE
);
ok
(
hres
==
S_OK
,
"put_StatusBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_StatusBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_StatusBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_StatusBar
(
wb
,
VARIANT_FALSE
);
ok
(
hres
==
S_OK
,
"put_StatusBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_StatusBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_StatusBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_FALSE
,
"b=%x
\n
"
,
b
);
hres
=
IWebBrowser2_put_StatusBar
(
wb
,
100
);
ok
(
hres
==
S_OK
,
"put_StatusBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_StatusBar
(
wb
,
&
b
);
ok
(
hres
==
S_OK
,
"get_StatusBar failed: %08lx
\n
"
,
hres
);
ok
(
b
==
VARIANT_TRUE
,
"b=%x
\n
"
,
b
);
/* ToolBar */
hres
=
IWebBrowser2_get_ToolBar
(
wb
,
&
i
);
ok
(
hres
==
S_OK
,
"get_ToolBar failed: %08lx
\n
"
,
hres
);
ok
(
i
==
VARIANT_TRUE
,
"i=%x
\n
"
,
i
);
hres
=
IWebBrowser2_put_ToolBar
(
wb
,
VARIANT_FALSE
);
ok
(
hres
==
S_OK
,
"put_ToolBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_ToolBar
(
wb
,
&
i
);
ok
(
hres
==
S_OK
,
"get_ToolBar failed: %08lx
\n
"
,
hres
);
ok
(
i
==
VARIANT_FALSE
,
"b=%x
\n
"
,
i
);
hres
=
IWebBrowser2_put_ToolBar
(
wb
,
100
);
ok
(
hres
==
S_OK
,
"put_ToolBar failed: %08lx
\n
"
,
hres
);
hres
=
IWebBrowser2_get_ToolBar
(
wb
,
&
i
);
ok
(
hres
==
S_OK
,
"get_ToolBar failed: %08lx
\n
"
,
hres
);
ok
(
i
==
VARIANT_TRUE
,
"i=%x
\n
"
,
i
);
hres
=
IWebBrowser2_put_ToolBar
(
wb
,
VARIANT_TRUE
);
ok
(
hres
==
S_OK
,
"put_ToolBar failed: %08lx
\n
"
,
hres
);
IWebBrowser2_Release
(
wb
);
}
static
void
test_WebBrowser
(
void
)
static
void
test_WebBrowser
(
void
)
{
{
IUnknown
*
unk
=
NULL
;
IUnknown
*
unk
=
NULL
;
...
@@ -709,6 +825,7 @@ static void test_WebBrowser(void)
...
@@ -709,6 +825,7 @@ static void test_WebBrowser(void)
test_ClientSite
(
unk
,
&
ClientSite
);
test_ClientSite
(
unk
,
&
ClientSite
);
test_DoVerb
(
unk
);
test_DoVerb
(
unk
);
test_ClientSite
(
unk
,
NULL
);
test_ClientSite
(
unk
,
NULL
);
test_ie_funcs
(
unk
);
ref
=
IUnknown_Release
(
unk
);
ref
=
IUnknown_Release
(
unk
);
ok
(
ref
==
0
,
"ref=%ld, expected 0
\n
"
,
ref
);
ok
(
ref
==
0
,
"ref=%ld, expected 0
\n
"
,
ref
);
...
...
dlls/shdocvw/webbrowser.c
View file @
f06f3cf4
...
@@ -541,7 +541,7 @@ static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL
...
@@ -541,7 +541,7 @@ static HRESULT WINAPI WebBrowser_put_StatusBar(IWebBrowser2 *iface, VARIANT_BOOL
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
This
->
status_bar
=
Value
;
This
->
status_bar
=
Value
?
VARIANT_TRUE
:
VARIANT_FALSE
;
/* In opposition to InternetExplorer, all we should do here is
/* In opposition to InternetExplorer, all we should do here is
* inform the embedder about the status bar change. */
* inform the embedder about the status bar change. */
...
@@ -615,7 +615,7 @@ static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL V
...
@@ -615,7 +615,7 @@ static HRESULT WINAPI WebBrowser_put_MenuBar(IWebBrowser2 *iface, VARIANT_BOOL V
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
This
->
menu_bar
=
Value
;
This
->
menu_bar
=
Value
?
VARIANT_TRUE
:
VARIANT_FALSE
;
/* In opposition to InternetExplorer, all we should do here is
/* In opposition to InternetExplorer, all we should do here is
* inform the embedder about the menu bar change. */
* inform the embedder about the menu bar change. */
...
@@ -815,7 +815,7 @@ static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOO
...
@@ -815,7 +815,7 @@ static HRESULT WINAPI WebBrowser_put_AddressBar(IWebBrowser2 *iface, VARIANT_BOO
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
Value
);
This
->
address_bar
=
Value
;
This
->
address_bar
=
Value
?
VARIANT_TRUE
:
VARIANT_FALSE
;
/* In opposition to InternetExplorer, all we should do here is
/* In opposition to InternetExplorer, all we should do here is
* inform the embedder about the address bar change. */
* inform the embedder about the address bar change. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment