Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8b1bd3e5
Commit
8b1bd3e5
authored
Nov 12, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ieframe: Added IWebBrowser2::Refresh tests.
parent
9c3c5704
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
8 deletions
+35
-8
webbrowser.c
dlls/ieframe/tests/webbrowser.c
+35
-8
No files found.
dlls/ieframe/tests/webbrowser.c
View file @
8b1bd3e5
...
...
@@ -126,6 +126,7 @@ DEFINE_EXPECT(Exec_SETTITLE);
DEFINE_EXPECT
(
QueryStatus_SETPROGRESSTEXT
);
DEFINE_EXPECT
(
Exec_STOP
);
DEFINE_EXPECT
(
Exec_IDM_STOP
);
DEFINE_EXPECT
(
Exec_DocHostCommandHandler_2300
);
DEFINE_EXPECT
(
QueryStatus_STOP
);
DEFINE_EXPECT
(
QueryStatus_IDM_STOP
);
DEFINE_EXPECT
(
DocHost_EnableModeless_TRUE
);
...
...
@@ -160,6 +161,7 @@ static int wb_version;
#define DWL_FROM_PUT_HREF 0x02
#define DWL_FROM_GOBACK 0x04
#define DWL_HTTP 0x08
#define DWL_REFRESH 0x10
static
DWORD
dwl_flags
;
...
...
@@ -453,6 +455,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
case
105
:
/* TODO */
case
138
:
/* TODO */
case
140
:
/* TODO (Win7) */
case
144
:
/* TODO */
return
E_FAIL
;
default:
ok
(
0
,
"unexpected nCmdID %d
\n
"
,
nCmdID
);
...
...
@@ -468,6 +471,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
switch
(
nCmdID
)
{
case
6041
:
/* TODO */
break
;
case
2300
:
CHECK_EXPECT
(
Exec_DocHostCommandHandler_2300
);
return
E_NOTIMPL
;
default:
ok
(
0
,
"unexpected nCmdID %d of CGID_DocHostCommandHandler
\n
"
,
nCmdID
);
}
...
...
@@ -2697,14 +2703,15 @@ static void test_ExecWB(IWebBrowser2 *webbrowser, BOOL use_custom_target, BOOL h
static
void
test_download
(
DWORD
flags
)
{
BOOL
*
b
=
(
flags
&
DWL_REFRESH
)
?
&
called_Exec_SETDOWNLOADSTATE_0
:
&
called_Invoke_DOCUMENTCOMPLETE
;
MSG
msg
;
is_downloading
=
TRUE
;
dwl_flags
=
flags
;
test_ready_state
((
flags
&
(
DWL_FROM_PUT_HREF
|
DWL_FROM_GOBACK
))
?
READYSTATE_COMPLETE
:
READYSTATE_LOADING
);
test_ready_state
((
flags
&
(
DWL_FROM_PUT_HREF
|
DWL_FROM_GOBACK
|
DWL_REFRESH
))
?
READYSTATE_COMPLETE
:
READYSTATE_LOADING
);
if
((
is_http
&&
!
(
flags
&
DWL_FROM_GOBACK
))
||
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
))
if
((
is_http
&&
!
(
flags
&
(
DWL_FROM_GOBACK
|
DWL_REFRESH
)
))
||
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
))
SET_EXPECT
(
Invoke_PROPERTYCHANGE
);
if
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
)
{
...
...
@@ -2727,11 +2734,13 @@ static void test_download(DWORD flags)
SET_EXPECT
(
GetHostInfo
);
SET_EXPECT
(
Exec_SETDOWNLOADSTATE_0
);
SET_EXPECT
(
Invoke_TITLECHANGE
);
SET_EXPECT
(
Invoke_NAVIGATECOMPLETE2
);
if
(
!
(
flags
&
DWL_REFRESH
))
SET_EXPECT
(
Invoke_NAVIGATECOMPLETE2
);
if
(
is_first_load
)
SET_EXPECT
(
GetDropTarget
);
SET_EXPECT
(
Invoke_PROGRESSCHANGE
);
SET_EXPECT
(
Invoke_DOCUMENTCOMPLETE
);
if
(
!
(
flags
&
DWL_REFRESH
))
SET_EXPECT
(
Invoke_DOCUMENTCOMPLETE
);
if
(
flags
&
DWL_HTTP
)
SET_EXPECT
(
Exec_SETTITLE
);
...
...
@@ -2739,12 +2748,12 @@ static void test_download(DWORD flags)
SET_EXPECT
(
Exec_UPDATECOMMANDS
);
SET_EXPECT
(
QueryStatus_STOP
);
while
(
!
called_Invoke_DOCUMENTCOMPLETE
&&
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
while
(
!
*
b
&&
GetMessage
(
&
msg
,
NULL
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
if
((
is_http
&&
!
(
flags
&
DWL_FROM_GOBACK
))
||
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
))
if
((
is_http
&&
!
(
flags
&
(
DWL_FROM_GOBACK
|
DWL_REFRESH
)
))
||
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
))
todo_wine
CHECK_CALLED
(
Invoke_PROPERTYCHANGE
);
if
(
flags
&
DWL_EXPECT_BEFORE_NAVIGATE
)
{
...
...
@@ -2773,11 +2782,13 @@ static void test_download(DWORD flags)
todo_wine
CHECK_CALLED
(
GetHostInfo
);
CHECK_CALLED
(
Exec_SETDOWNLOADSTATE_0
);
todo_wine
CHECK_CALLED
(
Invoke_TITLECHANGE
);
CHECK_CALLED
(
Invoke_NAVIGATECOMPLETE2
);
if
(
!
(
flags
&
DWL_REFRESH
))
CHECK_CALLED
(
Invoke_NAVIGATECOMPLETE2
);
if
(
is_first_load
)
todo_wine
CHECK_CALLED
(
GetDropTarget
);
todo_wine
CHECK_CALLED
(
Invoke_PROGRESSCHANGE
);
CHECK_CALLED
(
Invoke_DOCUMENTCOMPLETE
);
if
(
!
(
flags
&
DWL_REFRESH
))
CHECK_CALLED
(
Invoke_DOCUMENTCOMPLETE
);
is_downloading
=
FALSE
;
...
...
@@ -2795,6 +2806,20 @@ static void test_download(DWORD flags)
CLEAR_CALLED
(
QueryStatus_STOP
);
}
static
void
test_Refresh
(
IWebBrowser2
*
webbrowser
)
{
HRESULT
hres
;
trace
(
"Refresh...
\n
"
);
SET_EXPECT
(
Exec_DocHostCommandHandler_2300
);
hres
=
IWebBrowser2_Refresh
(
webbrowser
);
ok
(
hres
==
S_OK
,
"Refresh failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
Exec_DocHostCommandHandler_2300
);
test_download
(
DWL_REFRESH
);
}
static
void
test_olecmd
(
IWebBrowser2
*
unk
,
BOOL
loaded
)
{
IOleCommandTarget
*
cmdtrg
;
...
...
@@ -3336,6 +3361,8 @@ static void test_WebBrowser(BOOL do_download, BOOL do_close)
test_Navigate2
(
webbrowser
,
"http://test.winehq.org/tests/hello.html"
);
test_download
(
DWL_EXPECT_BEFORE_NAVIGATE
|
DWL_HTTP
);
test_Refresh
(
webbrowser
);
trace
(
"put_href http URL...
\n
"
);
test_put_href
(
webbrowser
,
"http://www.winehq.org/"
);
test_download
(
DWL_FROM_PUT_HREF
|
DWL_HTTP
);
...
...
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