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
b6cf2653
Commit
b6cf2653
authored
Jun 30, 2015
by
Zhenbo Li
Committed by
Alexandre Julliard
Jul 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Add IHTMLXMLHttpRequest::readyState property implementation.
parent
d6b92300
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
xmlhttprequest.c
dlls/mshtml/tests/xmlhttprequest.c
+8
-8
xmlhttprequest.c
dlls/mshtml/xmlhttprequest.c
+14
-2
No files found.
dlls/mshtml/tests/xmlhttprequest.c
View file @
b6cf2653
...
...
@@ -362,12 +362,12 @@ static void test_sync_xhr(IHTMLDocument2 *doc, const char *xml_url)
ok
(
V_DISPATCH
(
&
var
)
==
(
IDispatch
*
)
&
xmlhttprequest_onreadystatechange_obj
,
"unexpected onreadystatechange value
\n
"
);
hres
=
IHTMLXMLHttpRequest_get_readyState
(
xhr
,
NULL
);
todo_wine
ok
(
hres
==
E_POINTER
,
"Expect E_POINTER, got %08x
\n
"
,
hres
);
ok
(
hres
==
E_POINTER
,
"Expect E_POINTER, got %08x
\n
"
,
hres
);
val
=
0xdeadbeef
;
hres
=
IHTMLXMLHttpRequest_get_readyState
(
xhr
,
&
val
);
todo_wine
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
todo_wine
ok
(
val
==
0
,
"Expect UNSENT, got %d
\n
"
,
val
);
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
ok
(
val
==
0
,
"Expect UNSENT, got %d
\n
"
,
val
);
hres
=
IHTMLXMLHttpRequest_get_status
(
xhr
,
NULL
);
todo_wine
ok
(
hres
==
E_POINTER
,
"Expect E_POINTER, got %08x
\n
"
,
hres
);
...
...
@@ -492,8 +492,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
val
=
0xdeadbeef
;
hres
=
IHTMLXMLHttpRequest_get_readyState
(
xhr
,
&
val
);
todo_wine
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
todo_wine
ok
(
val
==
0
,
"Expect UNSENT, got %d
\n
"
,
val
);
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
ok
(
val
==
0
,
"Expect UNSENT, got %d
\n
"
,
val
);
method
=
a2bstr
(
"GET"
);
url
=
a2bstr
(
xml_url
);
...
...
@@ -526,8 +526,8 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
val
=
0xdeadbeef
;
hres
=
IHTMLXMLHttpRequest_get_readyState
(
xhr
,
&
val
);
todo_wine
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
todo_wine
ok
(
val
==
1
,
"Expect OPENED, got %d
\n
"
,
val
);
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
ok
(
val
==
1
,
"Expect OPENED, got %d
\n
"
,
val
);
SET_EXPECT
(
xmlhttprequest_onreadystatechange_opened
);
SET_EXPECT
(
xmlhttprequest_onreadystatechange_headers_received
);
...
...
@@ -564,7 +564,7 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
val
=
0xdeadbeef
;
hres
=
IHTMLXMLHttpRequest_get_readyState
(
xhr
,
&
val
);
ok
(
hres
==
S_OK
,
"get_readyState failed: %08x
\n
"
,
hres
);
ok
(
val
==
4
,
"Expect DONE, got %d
\n
"
,
val
);
todo_wine
ok
(
val
==
4
,
"Expect DONE, got %d
\n
"
,
val
);
hres
=
IHTMLXMLHttpRequest_get_responseText
(
xhr
,
&
text
);
ok
(
hres
==
S_OK
,
"get_responseText failed: %08x
\n
"
,
hres
);
...
...
dlls/mshtml/xmlhttprequest.c
View file @
b6cf2653
...
...
@@ -158,8 +158,20 @@ static HRESULT WINAPI HTMLXMLHttpRequest_Invoke(IHTMLXMLHttpRequest *iface, DISP
static
HRESULT
WINAPI
HTMLXMLHttpRequest_get_readyState
(
IHTMLXMLHttpRequest
*
iface
,
LONG
*
p
)
{
HTMLXMLHttpRequest
*
This
=
impl_from_IHTMLXMLHttpRequest
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
UINT16
val
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
!
p
)
return
E_POINTER
;
nsres
=
nsIXMLHttpRequest_GetReadyState
(
This
->
nsxhr
,
&
val
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"nsIXMLHttpRequest_GetReadyState failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
*
p
=
val
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLXMLHttpRequest_get_responseBody
(
IHTMLXMLHttpRequest
*
iface
,
VARIANT
*
p
)
...
...
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