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
4bc25995
Commit
4bc25995
authored
Jul 09, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Added more DoVerb tests.
parent
edcc38c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
2 deletions
+93
-2
webbrowser.c
dlls/ieframe/tests/webbrowser.c
+93
-2
No files found.
dlls/ieframe/tests/webbrowser.c
View file @
4bc25995
...
...
@@ -1753,8 +1753,7 @@ static HWND create_container_window(void)
RegisterClassExW
(
&
wndclass
);
return
CreateWindowW
(
wszWebBrowserContainer
,
wszWebBrowserContainer
,
WS_OVERLAPPEDWINDOW
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
NULL
,
NULL
);
WS_OVERLAPPEDWINDOW
,
10
,
10
,
600
,
600
,
NULL
,
NULL
,
NULL
,
NULL
);
}
static
void
test_DoVerb
(
IUnknown
*
unk
)
...
...
@@ -1805,6 +1804,40 @@ static void test_DoVerb(IUnknown *unk)
IOleObject_Release
(
oleobj
);
}
static
void
call_DoVerb
(
IUnknown
*
unk
,
LONG
verb
)
{
IOleObject
*
oleobj
;
RECT
rect
=
{
60
,
60
,
600
,
600
};
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleObject
,
(
void
**
)
&
oleobj
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_OleObject) failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
hres
=
IOleObject_DoVerb
(
oleobj
,
verb
,
NULL
,
&
ClientSite
,
-
1
,
container_hwnd
,
&
rect
);
ok
(
hres
==
S_OK
,
"DoVerb failed: %08x
\n
"
,
hres
);
IOleObject_Release
(
oleobj
);
}
static
HWND
get_hwnd
(
IUnknown
*
unk
)
{
IOleInPlaceObject
*
inplace
;
HWND
hwnd
;
HRESULT
hres
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IOleInPlaceObject
,
(
void
**
)
&
inplace
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_OleInPlaceObject) failed: %08x
\n
"
,
hres
);
hres
=
IOleInPlaceObject_GetWindow
(
inplace
,
&
hwnd
);
ok
(
hres
==
S_OK
,
"GetWindow failed: %08x
\n
"
,
hres
);
IOleInPlaceObject_Release
(
inplace
);
return
hwnd
;
}
static
void
test_GetMiscStatus
(
IOleObject
*
oleobj
)
{
DWORD
st
,
i
;
...
...
@@ -3423,6 +3456,62 @@ static void test_WebBrowser_slim_container(void)
ok
(
ref
==
0
,
"ref=%d, expected 0
\n
"
,
ref
);
}
static
void
test_WebBrowser_DoVerb
(
void
)
{
IUnknown
*
unk
=
NULL
;
HRESULT
hres
;
RECT
rect
;
HWND
hwnd
;
ULONG
ref
;
BOOL
res
;
is_downloading
=
FALSE
;
is_first_load
=
TRUE
;
use_container_olecmd
=
FALSE
;
if
(
FAILED
(
create_WebBrowser
(
&
unk
)))
return
;
hres
=
IUnknown_QueryInterface
(
unk
,
&
IID_IWebBrowser2
,
(
void
**
)
&
wb
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IWebBrowser) failed: %08x
\n
"
,
hres
);
if
(
FAILED
(
hres
))
return
;
test_ClientSite
(
unk
,
&
ClientSite
,
FALSE
);
SET_EXPECT
(
CanInPlaceActivate
);
SET_EXPECT
(
Site_GetWindow
);
SET_EXPECT
(
OnInPlaceActivate
);
SET_EXPECT
(
GetWindowContext
);
SET_EXPECT
(
ShowObject
);
SET_EXPECT
(
GetContainer
);
SET_EXPECT
(
Frame_GetWindow
);
call_DoVerb
(
unk
,
OLEIVERB_INPLACEACTIVATE
);
CHECK_CALLED
(
CanInPlaceActivate
);
CHECK_CALLED
(
Site_GetWindow
);
CHECK_CALLED
(
OnInPlaceActivate
);
CHECK_CALLED
(
GetWindowContext
);
CHECK_CALLED
(
ShowObject
);
CHECK_CALLED
(
GetContainer
);
CHECK_CALLED
(
Frame_GetWindow
);
hwnd
=
get_hwnd
(
unk
);
memset
(
&
rect
,
0xa
,
sizeof
(
rect
));
res
=
GetWindowRect
(
hwnd
,
&
rect
);
ok
(
res
,
"GetWindowRect failed: %u
\n
"
,
GetLastError
());
SET_EXPECT
(
OnInPlaceDeactivate
);
call_DoVerb
(
unk
,
OLEIVERB_HIDE
);
CHECK_CALLED
(
OnInPlaceDeactivate
);
test_ClientSite
(
unk
,
NULL
,
FALSE
);
IWebBrowser2_Release
(
wb
);
ref
=
IUnknown_Release
(
unk
);
ok
(
ref
==
0
,
"ref=%d, expected 0
\n
"
,
ref
);
}
/* Check if Internet Explorer is configured to run in "Enhanced Security Configuration" (aka hardened mode) */
/* Note: this code is duplicated in dlls/mshtml/tests/mshtml_test.h and dlls/urlmon/tests/sec_mgr.c */
static
BOOL
is_ie_hardened
(
void
)
...
...
@@ -3461,6 +3550,8 @@ START_TEST(webbrowser)
win_skip
(
"Skipping http tests in hardened mode
\n
"
);
}
trace
(
"Testing WebBrowser DoVerb
\n
"
);
test_WebBrowser_DoVerb
();
trace
(
"Testing WebBrowser (with close)...
\n
"
);
test_WebBrowser
(
TRUE
,
TRUE
);
trace
(
"Testing WebBrowser w/o container-based olecmd...
\n
"
);
...
...
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