mshtml/tests: Skip some tests if native XMLHTTP support is missing or disabled.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3e8acbac87
commit
3cb8e4bdc8
|
@ -6683,7 +6683,12 @@ static void test_xmlhttprequest(IHTMLWindow5 *window)
|
||||||
|
|
||||||
hres = IHTMLWindow5_get_XMLHttpRequest(window, &var);
|
hres = IHTMLWindow5_get_XMLHttpRequest(window, &var);
|
||||||
ok(hres == S_OK, "get_XMLHttpRequest failed: %08x\n", hres);
|
ok(hres == S_OK, "get_XMLHttpRequest failed: %08x\n", hres);
|
||||||
ok(V_VT(&var) == VT_DISPATCH, "expect VT_DISPATCH, got %s\n", debugstr_variant(&var));
|
ok(V_VT(&var) == VT_DISPATCH || broken(V_VT(&var) == VT_EMPTY), "expect VT_DISPATCH, got %s\n", debugstr_variant(&var));
|
||||||
|
|
||||||
|
if (V_VT(&var) == VT_EMPTY) {
|
||||||
|
win_skip("Native XMLHTTP support is missing or disabled.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
factory = NULL;
|
factory = NULL;
|
||||||
hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IHTMLXMLHttpRequestFactory, (void**)&factory);
|
hres = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IHTMLXMLHttpRequestFactory, (void**)&factory);
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<script src="winetest.js" type="text/javascript"></script>
|
||||||
|
</head>
|
||||||
|
<head>
|
||||||
<script>
|
<script>
|
||||||
function ok(b,m) {
|
|
||||||
return external.ok(b, m);
|
|
||||||
}
|
|
||||||
|
|
||||||
function broken(expr) {
|
function broken(expr) {
|
||||||
return external.broken(expr);
|
return external.broken(expr);
|
||||||
}
|
}
|
||||||
|
@ -356,7 +355,11 @@ function test_text_node() {
|
||||||
|
|
||||||
function test_xhr() {
|
function test_xhr() {
|
||||||
ok("XMLHttpRequest" in window, "XMLHttpRequest not found in window object\n");
|
ok("XMLHttpRequest" in window, "XMLHttpRequest not found in window object\n");
|
||||||
ok(typeof(XMLHttpRequest) === "object", "typeof(XMLHttpRequest) = " + typeof(XMLHttpRequest));
|
|
||||||
|
if (typeof(XMLHttpRequest) != "object") {
|
||||||
|
win_skip("XMLHTTPRequest is not available or disabled");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
ok(typeof(xhr) === "object", "typeof(xhr) = " + typeof(xhr));
|
ok(typeof(xhr) === "object", "typeof(xhr) = " + typeof(xhr));
|
||||||
|
|
Loading…
Reference in New Issue