mshtml: Match IE8 implementation.
This commit is contained in:
parent
45c00da496
commit
79fcaa7835
|
@ -157,6 +157,11 @@ static HRESULT WINAPI HTMLDOMChildrenCollection_item(IHTMLDOMChildrenCollection
|
||||||
|
|
||||||
TRACE("(%p)->(%d %p)\n", This, index, ppItem);
|
TRACE("(%p)->(%d %p)\n", This, index, ppItem);
|
||||||
|
|
||||||
|
if (ppItem)
|
||||||
|
*ppItem = NULL;
|
||||||
|
else
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
nsIDOMNodeList_GetLength(This->nslist, &length);
|
nsIDOMNodeList_GetLength(This->nslist, &length);
|
||||||
if(index < 0 || index >= length)
|
if(index < 0 || index >= length)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
|
@ -4456,15 +4456,17 @@ static void test_elems(IHTMLDocument2 *doc)
|
||||||
IHTMLDOMNode_Release(node);
|
IHTMLDOMNode_Release(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
disp = (void*)0xdeadbeef;
|
hres = IHTMLDOMChildrenCollection_item(child_col, length - 1, NULL);
|
||||||
|
ok(hres == E_POINTER, "item failed: %08x, expected E_POINTER\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLDOMChildrenCollection_item(child_col, length, NULL);
|
||||||
|
ok(hres == E_POINTER, "item failed: %08x, expected E_POINTER\n", hres);
|
||||||
|
|
||||||
hres = IHTMLDOMChildrenCollection_item(child_col, 6000, &disp);
|
hres = IHTMLDOMChildrenCollection_item(child_col, 6000, &disp);
|
||||||
ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres);
|
ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres);
|
||||||
ok(disp == (void*)0xdeadbeef, "disp=%p\n", disp);
|
|
||||||
|
|
||||||
disp = (void*)0xdeadbeef;
|
|
||||||
hres = IHTMLDOMChildrenCollection_item(child_col, length, &disp);
|
hres = IHTMLDOMChildrenCollection_item(child_col, length, &disp);
|
||||||
ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres);
|
ok(hres == E_INVALIDARG, "item failed: %08x, expected E_INVALIDARG\n", hres);
|
||||||
ok(disp == (void*)0xdeadbeef, "disp=%p\n", disp);
|
|
||||||
|
|
||||||
test_child_col_disp(child_col);
|
test_child_col_disp(child_col);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue