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
eb54df63
Commit
eb54df63
authored
Jan 11, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Added IHTMLUniqueName tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a52cb2b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
dom.c
dlls/mshtml/tests/dom.c
+29
-3
No files found.
dlls/mshtml/tests/dom.c
View file @
eb54df63
...
...
@@ -6209,10 +6209,13 @@ static void test_default_selection(IHTMLDocument2 *doc)
IHTMLTxtRange_Release
(
range
);
}
static
void
test_unique_id
(
IHTMLDocument2
*
doc
)
static
void
test_unique_id
(
IHTMLDocument2
*
doc
,
IHTMLElement
*
elem
)
{
IHTMLDocument3
*
doc3
=
get_doc3_iface
(
doc
);
IHTMLUniqueName
*
unique_name
;
char
buf
[
32
];
BSTR
id
,
id2
;
LONG
num
;
HRESULT
hres
;
static
const
WCHAR
prefixW
[]
=
{
'm'
,
's'
,
'_'
,
'_'
,
'i'
,
'd'
,
0
};
...
...
@@ -6235,6 +6238,30 @@ static void test_unique_id(IHTMLDocument2 *doc)
SysFreeString
(
id
);
SysFreeString
(
id2
);
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLUniqueName
,
(
void
**
)
&
unique_name
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLUniqueName iface: %08x
\n
"
,
hres
);
hres
=
IHTMLUniqueName_get_uniqueID
(
unique_name
,
&
id
);
ok
(
hres
==
S_OK
,
"get_uniqueName failed: %08x
\n
"
,
hres
);
trace
(
"id %s
\n
"
,
wine_dbgstr_w
(
id
));
hres
=
IHTMLUniqueName_get_uniqueID
(
unique_name
,
&
id2
);
ok
(
hres
==
S_OK
,
"get_uniqueName failed: %08x
\n
"
,
hres
);
ok
(
!
lstrcmpW
(
id
,
id2
),
"unique names differ
\n
"
);
trace
(
"id %s
\n
"
,
wine_dbgstr_w
(
id2
));
hres
=
IHTMLUniqueName_get_uniqueNumber
(
unique_name
,
&
num
);
ok
(
hres
==
S_OK
,
"get_uniqueName failed: %08x
\n
"
,
hres
);
ok
(
num
,
"num = 0
\n
"
);
sprintf
(
buf
,
"ms__id%u"
,
num
);
ok
(
!
strcmp_wa
(
id
,
buf
),
"unexpected id %s
\n
"
,
wine_dbgstr_w
(
id
));
trace
(
"num %d
\n
"
,
num
);
SysFreeString
(
id
);
SysFreeString
(
id2
);
IHTMLUniqueName_Release
(
unique_name
);
IHTMLDocument3_Release
(
doc3
);
}
...
...
@@ -6272,10 +6299,9 @@ static void test_doc_elem(IHTMLDocument2 *doc)
IHTMLDocument2_Release
(
doc_node
);
test_elem_client_rect
((
IUnknown
*
)
elem
);
test_unique_id
(
doc
,
elem
);
IHTMLElement_Release
(
elem
);
test_unique_id
(
doc
);
}
static
void
test_default_body
(
IHTMLBodyElement
*
body
)
...
...
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