Commit f3593602 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Clean up OleCommandTarget_Exec.

parent cbf3ade4
...@@ -2733,12 +2733,9 @@ static void test_save_history(IUnknown *unk) ...@@ -2733,12 +2733,9 @@ static void test_save_history(IUnknown *unk)
static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup, static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID *pguidCmdGroup,
DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
{ {
if((!pguidCmdGroup || !IsEqualGUID(pguidCmdGroup, &CGID_Explorer)) if(!pguidCmdGroup) {
&& (!pguidCmdGroup || !IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)
|| (nCmdID != 63 && (!is_refresh || nCmdID != 37))))
test_readyState(NULL); test_readyState(NULL);
if(!pguidCmdGroup) {
switch(nCmdID) { switch(nCmdID) {
case OLECMDID_SETPROGRESSMAX: case OLECMDID_SETPROGRESSMAX:
CHECK_EXPECT2(Exec_SETPROGRESSMAX); CHECK_EXPECT2(Exec_SETPROGRESSMAX);
...@@ -2825,6 +2822,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -2825,6 +2822,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
} }
if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) { if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) {
if(nCmdID != 63 && (!is_refresh || nCmdID != 37))
test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) { switch(nCmdID) {
...@@ -2938,6 +2937,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -2938,6 +2937,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
} }
if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) { if(IsEqualGUID(&CGID_MSHTML, pguidCmdGroup)) {
test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) { switch(nCmdID) {
...@@ -2955,6 +2955,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -2955,6 +2955,9 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
switch(nCmdID) { switch(nCmdID) {
case DOCHOST_DOCCANNAVIGATE: case DOCHOST_DOCCANNAVIGATE:
CHECK_EXPECT(Exec_DOCCANNAVIGATE); CHECK_EXPECT(Exec_DOCCANNAVIGATE);
test_readyState(NULL);
ok(pvaIn != NULL, "pvaIn == NULL\n"); ok(pvaIn != NULL, "pvaIn == NULL\n");
ok(pvaOut == NULL, "pvaOut != NULL\n"); ok(pvaOut == NULL, "pvaOut != NULL\n");
ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n"); ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n");
...@@ -2967,6 +2970,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -2967,6 +2970,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
VARIANT var; VARIANT var;
HRESULT hres; HRESULT hres;
test_readyState(NULL);
ok(pvaIn != NULL, "pvaIn == NULL\n"); ok(pvaIn != NULL, "pvaIn == NULL\n");
ok(pvaOut != NULL || broken(!pvaOut), "pvaOut != NULL\n"); ok(pvaOut != NULL || broken(!pvaOut), "pvaOut != NULL\n");
ok(V_VT(pvaIn) == VT_ARRAY, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); ok(V_VT(pvaIn) == VT_ARRAY, "V_VT(pvaIn) = %d\n", V_VT(pvaIn));
...@@ -3018,6 +3023,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -3018,6 +3023,7 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
} }
if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) { if(IsEqualGUID(&CGID_Explorer, pguidCmdGroup)) {
test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt); ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
switch(nCmdID) { switch(nCmdID) {
...@@ -3047,6 +3053,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ...@@ -3047,6 +3053,8 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID
} }
if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) { if(IsEqualGUID(&CGID_DocHostCommandHandler, pguidCmdGroup)) {
test_readyState(NULL);
switch (nCmdID) { switch (nCmdID) {
case OLECMDID_PAGEACTIONBLOCKED: /* win2k3 */ case OLECMDID_PAGEACTIONBLOCKED: /* win2k3 */
SET_EXPECT(SetStatusText); SET_EXPECT(SetStatusText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment