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
529a7ed5
Commit
529a7ed5
authored
Apr 04, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Event tests code clean up.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6fd383e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
31 deletions
+20
-31
events.c
dlls/mshtml/tests/events.c
+20
-31
No files found.
dlls/mshtml/tests/events.c
View file @
529a7ed5
...
...
@@ -295,6 +295,7 @@ static IHTMLElement *_get_elem_id(unsigned line, IHTMLDocument2 *doc, const char
SysFreeString
(
str
);
IHTMLDocument3_Release
(
doc3
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"getElementById failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
elem
!=
NULL
,
"elem == NULL
\n
"
);
return
elem
;
}
...
...
@@ -2206,48 +2207,36 @@ static void test_timeout(IHTMLDocument2 *doc)
IHTMLWindow3_Release
(
win3
);
}
static
IHTML
Element
*
find_element_by_id
(
IHTMLDocument2
*
doc
,
const
char
*
id
)
static
IHTML
Window2
*
get_iframe_window
(
IHTMLIFrameElement
*
iframe
)
{
IHTMLWindow2
*
window
;
IHTMLFrameBase2
*
base
;
HRESULT
hres
;
IHTMLDocument3
*
doc3
;
IHTMLElement
*
result
;
BSTR
idW
=
a2bstr
(
id
);
hres
=
IHTML
Document2_QueryInterface
(
doc
,
&
IID_IHTMLDocument3
,
(
void
**
)
&
doc3
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IHTML
Document3
) failed: %08x
\n
"
,
hres
);
hres
=
IHTML
IFrameElement_QueryInterface
(
iframe
,
&
IID_IHTMLFrameBase2
,
(
void
**
)
&
base
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IHTML
FrameBase2
) failed: %08x
\n
"
,
hres
);
hres
=
IHTMLDocument3_getElementById
(
doc3
,
idW
,
&
result
);
ok
(
hres
==
S_OK
,
"getElementById failed: %08x
\n
"
,
hres
);
ok
(
result
!=
NULL
,
"result == NULL
\n
"
);
SysFreeString
(
idW
);
hres
=
IHTMLFrameBase2_get_contentWindow
(
base
,
&
window
);
ok
(
hres
==
S_OK
,
"get_contentWindow failed: %08x
\n
"
,
hres
);
ok
(
window
!=
NULL
,
"window == NULL
\n
"
);
IHTMLDocument3_Release
(
doc3
);
return
result
;
if
(
base
)
IHTMLFrameBase2_Release
(
base
);
return
window
;
}
static
IHTMLDocument2
*
get_iframe_doc
(
IHTMLIFrameElement
*
iframe
)
static
IHTMLDocument2
*
get_iframe_doc
(
IHTMLIFrameElement
*
iframe
)
{
HRESULT
hres
;
IHTMLFrameBase2
*
base
;
IHTMLDocument2
*
result
=
NULL
;
IHTMLWindow2
*
window
;
HRESULT
hres
;
hres
=
IHTMLIFrameElement_QueryInterface
(
iframe
,
&
IID_IHTMLFrameBase2
,
(
void
**
)
&
base
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IHTMLFrameBase2) failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
IHTMLWindow2
*
window
;
window
=
get_iframe_window
(
iframe
);
hres
=
IHTMLFrameBase2_get_contentWindow
(
base
,
&
window
);
ok
(
hres
==
S_OK
,
"get_contentWindow failed: %08x
\n
"
,
hres
);
ok
(
window
!=
NULL
,
"window == NULL
\n
"
);
if
(
window
)
{
hres
=
IHTMLWindow2_get_document
(
window
,
&
result
);
ok
(
hres
==
S_OK
,
"get_document failed: %08x
\n
"
,
hres
);
ok
(
result
!=
NULL
,
"result == NULL
\n
"
);
IHTMLWindow2_Release
(
window
);
}
}
if
(
base
)
IHTMLFrameBase2_Release
(
base
);
hres
=
IHTMLWindow2_get_document
(
window
,
&
result
);
ok
(
hres
==
S_OK
,
"get_document failed: %08x
\n
"
,
hres
);
ok
(
result
!=
NULL
,
"result == NULL
\n
"
);
IHTMLWindow2_Release
(
window
);
return
result
;
}
...
...
@@ -2263,7 +2252,7 @@ static void test_iframe_connections(IHTMLDocument2 *doc)
trace
(
"iframe tests...
\n
"
);
element
=
find_element_by
_id
(
doc
,
"ifr"
);
element
=
get_elem
_id
(
doc
,
"ifr"
);
iframe
=
get_iframe_iface
((
IUnknown
*
)
element
);
IHTMLElement_Release
(
element
);
...
...
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