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
4fc1d8ee
Commit
4fc1d8ee
authored
Jul 07, 2023
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Jul 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Fix anchor element leaks in test helpers.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
e7f19883
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
dom.c
dlls/mshtml/tests/dom.c
+13
-0
No files found.
dlls/mshtml/tests/dom.c
View file @
4fc1d8ee
...
...
@@ -1550,6 +1550,7 @@ static void _test_anchor_href(unsigned line, IUnknown *unk, const WCHAR *exhref)
hres
=
IHTMLAnchorElement_get_href
(
anchor
,
&
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_href failed: %08lx
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
exhref
),
"href = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
exhref
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
_test_disp_value
(
line
,
unk
,
exhref
);
...
...
@@ -1565,6 +1566,7 @@ static void _test_anchor_put_href(unsigned line, IUnknown *unk, const WCHAR *exh
str
=
SysAllocString
(
exhref
);
hres
=
IHTMLAnchorElement_put_href
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_href failed: %08lx
\n
"
,
hres
);
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
_test_disp_value
(
line
,
unk
,
exhref
);
...
...
@@ -1583,6 +1585,7 @@ static void _test_anchor_rel(unsigned line, IUnknown *unk, const WCHAR *exrel)
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
exrel
),
"rel = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
exrel
));
else
ok_
(
__FILE__
,
line
)(
!
str
,
"rel = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1596,6 +1599,7 @@ static void _test_anchor_put_rel(unsigned line, IUnknown *unk, const WCHAR *exre
str
=
SysAllocString
(
exrel
);
hres
=
IHTMLAnchorElement_put_rel
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"get_rel failed: %08lx
\n
"
,
hres
);
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1612,6 +1616,7 @@ static void _test_anchor_get_target(unsigned line, IUnknown *unk, const WCHAR *t
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
target
),
"target = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
target
));
else
ok_
(
__FILE__
,
line
)(
str
==
NULL
,
"target = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1625,6 +1630,7 @@ static void _test_anchor_put_target(unsigned line, IUnknown *unk, const WCHAR *t
str
=
target
?
SysAllocString
(
target
)
:
NULL
;
hres
=
IHTMLAnchorElement_put_target
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_target failed: %08lx
\n
"
,
hres
);
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1641,6 +1647,7 @@ static void _test_anchor_name(unsigned line, IUnknown *unk, const WCHAR *name)
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
name
),
"name = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
name
));
else
ok_
(
__FILE__
,
line
)(
str
==
NULL
,
"name = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1654,6 +1661,7 @@ static void _test_anchor_put_name(unsigned line, IUnknown *unk, const WCHAR *nam
str
=
name
?
SysAllocString
(
name
)
:
NULL
;
hres
=
IHTMLAnchorElement_put_name
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_name failed: %08lx
\n
"
,
hres
);
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
_test_anchor_name
(
line
,
unk
,
name
);
...
...
@@ -1672,6 +1680,7 @@ static void _test_anchor_hostname(unsigned line, IUnknown *unk, const WCHAR *hos
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
hostname
),
"hostname = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
hostname
));
else
ok_
(
__FILE__
,
line
)(
str
==
NULL
,
"hostname = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1688,6 +1697,7 @@ static void _test_anchor_port(unsigned line, IUnknown *unk, const WCHAR *port)
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
port
),
"port = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
port
));
else
ok_
(
__FILE__
,
line
)(
str
==
NULL
,
"port = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1706,6 +1716,7 @@ static void _test_anchor_search(unsigned line, IUnknown *elem, const WCHAR *sear
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
search
),
"search = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
search
));
else
ok_
(
__FILE__
,
line
)(
!
str
,
"search = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1719,6 +1730,7 @@ static void _test_anchor_put_search(unsigned line, IUnknown *unk, const WCHAR *s
str
=
search
?
SysAllocString
(
search
)
:
NULL
;
hres
=
IHTMLAnchorElement_put_search
(
anchor
,
str
);
ok_
(
__FILE__
,
line
)(
hres
==
S_OK
,
"put_search failed: %08lx
\n
"
,
hres
);
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
@@ -1735,6 +1747,7 @@ static void _test_anchor_hash(unsigned line, IHTMLElement *elem, const WCHAR *ex
ok_
(
__FILE__
,
line
)(
!
lstrcmpW
(
str
,
exhash
),
"hash = %s, expected %s
\n
"
,
wine_dbgstr_w
(
str
),
wine_dbgstr_w
(
exhash
));
else
ok_
(
__FILE__
,
line
)(
!
str
,
"hash = %s, expected NULL
\n
"
,
wine_dbgstr_w
(
str
));
IHTMLAnchorElement_Release
(
anchor
);
SysFreeString
(
str
);
}
...
...
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