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
7f47d97e
Commit
7f47d97e
authored
Aug 21, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/mxnamespace: Stub IVBMXNamespaceManager and added some tests.
parent
92539672
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
0 deletions
+80
-0
dispex.c
dlls/msxml3/dispex.c
+1
-0
msxml_private.h
dlls/msxml3/msxml_private.h
+1
-0
mxnamespace.c
dlls/msxml3/mxnamespace.c
+0
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+78
-0
No files found.
dlls/msxml3/dispex.c
View file @
7f47d97e
...
...
@@ -114,6 +114,7 @@ static REFIID tid_ids[] = {
&
IID_IMXAttributes
,
&
IID_IMXReaderControl
,
&
IID_IMXWriter
,
&
IID_IVBMXNamespaceManager
};
HRESULT
get_typeinfo
(
enum
tid_t
tid
,
ITypeInfo
**
typeinfo
)
...
...
dlls/msxml3/msxml_private.h
View file @
7f47d97e
...
...
@@ -74,6 +74,7 @@ typedef enum tid_t {
IMXAttributes_tid
,
IMXReaderControl_tid
,
IMXWriter_tid
,
IVBMXNamespaceManager_tid
,
LAST_tid
}
tid_t
;
...
...
dlls/msxml3/mxnamespace.c
View file @
7f47d97e
This diff is collapsed.
Click to expand it.
dlls/msxml3/tests/domdoc.c
View file @
7f47d97e
...
...
@@ -10115,6 +10115,82 @@ static void test_load(void)
free_bstrs
();
}
static
void
test_nsnamespacemanager
(
void
)
{
IMXNamespaceManager
*
nsmgr
;
IVBMXNamespaceManager
*
mgr2
;
IDispatch
*
disp
;
HRESULT
hr
;
WCHAR
buffW
[
250
];
INT
len
;
hr
=
CoCreateInstance
(
&
CLSID_MXNamespaceManager40
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMXNamespaceManager
,
(
void
**
)
&
nsmgr
);
if
(
hr
!=
S_OK
)
{
win_skip
(
"MXNamespaceManager is not available
\n
"
);
return
;
}
/* IMXNamespaceManager inherits from IUnknown */
hr
=
IMXNamespaceManager_QueryInterface
(
nsmgr
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
EXPECT_HR
(
hr
,
S_OK
);
IDispatch_Release
(
disp
);
hr
=
IMXNamespaceManager_QueryInterface
(
nsmgr
,
&
IID_IVBMXNamespaceManager
,
(
void
**
)
&
mgr2
);
EXPECT_HR
(
hr
,
S_OK
);
IVBMXNamespaceManager_Release
(
mgr2
);
todo_wine
{
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
S_OK
);
/* prefix already added */
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
NULL
,
_bstr_
(
"ns0 uri"
));
EXPECT_HR
(
hr
,
S_FALSE
);
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
_bstr_
(
"ns0"
),
NULL
);
EXPECT_HR
(
hr
,
E_INVALIDARG
);
/* "xml" and "xmlns" are not allowed here */
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
_bstr_
(
"xml"
),
_bstr_
(
"uri1"
));
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
IMXNamespaceManager_declarePrefix
(
nsmgr
,
_bstr_
(
"xmlns"
),
_bstr_
(
"uri1"
));
EXPECT_HR
(
hr
,
E_INVALIDARG
);
hr
=
IMXNamespaceManager_getDeclaredPrefix
(
nsmgr
,
-
1
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_FAIL
);
hr
=
IMXNamespaceManager_getDeclaredPrefix
(
nsmgr
,
0
,
NULL
,
NULL
);
EXPECT_HR
(
hr
,
E_POINTER
);
len
=
-
1
;
hr
=
IMXNamespaceManager_getDeclaredPrefix
(
nsmgr
,
0
,
NULL
,
&
len
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
3
,
"got %d
\n
"
,
len
);
}
len
=
-
1
;
buffW
[
0
]
=
0x1
;
hr
=
IMXNamespaceManager_getDeclaredPrefix
(
nsmgr
,
0
,
buffW
,
&
len
);
todo_wine
EXPECT_HR
(
hr
,
E_XML_BUFFERTOOSMALL
);
ok
(
len
==
-
1
,
"got %d
\n
"
,
len
);
ok
(
buffW
[
0
]
==
0x1
,
"got %x
\n
"
,
buffW
[
0
]);
len
=
10
;
buffW
[
0
]
=
0x1
;
hr
=
IMXNamespaceManager_getDeclaredPrefix
(
nsmgr
,
0
,
buffW
,
&
len
);
todo_wine
{
EXPECT_HR
(
hr
,
S_OK
);
ok
(
len
==
3
,
"got %d
\n
"
,
len
);
ok
(
!
lstrcmpW
(
buffW
,
_bstr_
(
"xml"
)),
"got prefix %s
\n
"
,
wine_dbgstr_w
(
buffW
));
}
IMXNamespaceManager_Release
(
nsmgr
);
free_bstrs
();
}
START_TEST
(
domdoc
)
{
IXMLDOMDocument
*
doc
;
...
...
@@ -10189,5 +10265,7 @@ START_TEST(domdoc)
test_xsltemplate
();
test_nsnamespacemanager
();
CoUninitialize
();
}
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