From 7c6bb2fbfc289ea8b6166bebc05212999812b6c0 Mon Sep 17 00:00:00 2001 From: Thomas Mullaly Date: Tue, 12 Oct 2010 20:50:18 -0400 Subject: [PATCH] urlmon/tests: Added more CoInternetCombineIUri tests. --- dlls/urlmon/tests/uri.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index bf1ed1c158c..92fb94f36a0 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -6017,6 +6017,123 @@ static const uri_combine_test uri_combine_tests[] = { {URL_SCHEME_HTTP,S_OK}, {URLZONE_INVALID,E_NOTIMPL} } + }, + /* Windows validates the path component from the relative Uri. */ + { "http://google.com/test",0, + "/Te%XXst",Uri_CREATE_ALLOW_RELATIVE, + 0,E_INVALIDARG,TRUE + }, + /* Windows doesn't validate the query from the relative Uri. */ + { "http://google.com/test",0, + "?Tes%XXt",Uri_CREATE_ALLOW_RELATIVE, + 0,S_OK,TRUE, + { + {"http://google.com/test?Tes%XXt",S_OK}, + {"google.com",S_OK}, + {"http://google.com/test?Tes%XXt",S_OK}, + {"google.com",S_OK}, + {"",S_FALSE}, + {"",S_FALSE}, + {"google.com",S_OK}, + {"",S_FALSE}, + {"/test",S_OK}, + {"/test?Tes%XXt",S_OK}, + {"?Tes%XXt",S_OK}, + {"http://google.com/test?Tes%XXt",S_OK}, + {"http",S_OK}, + {"",S_FALSE}, + {"",S_FALSE} + }, + { + {Uri_HOST_DNS,S_OK}, + {80,S_OK}, + {URL_SCHEME_HTTP,S_OK}, + {URLZONE_INVALID,E_NOTIMPL} + } + }, + /* Windows doesn't validate the fragment from the relative Uri. */ + { "http://google.com/test",0, + "#Tes%XXt",Uri_CREATE_ALLOW_RELATIVE, + 0,S_OK,TRUE, + { + {"http://google.com/test#Tes%XXt",S_OK}, + {"google.com",S_OK}, + {"http://google.com/test#Tes%XXt",S_OK}, + {"google.com",S_OK}, + {"",S_FALSE}, + {"#Tes%XXt",S_OK}, + {"google.com",S_OK}, + {"",S_FALSE}, + {"/test",S_OK}, + {"/test",S_OK}, + {"",S_FALSE}, + {"http://google.com/test#Tes%XXt",S_OK}, + {"http",S_OK}, + {"",S_FALSE}, + {"",S_FALSE} + }, + { + {Uri_HOST_DNS,S_OK}, + {80,S_OK}, + {URL_SCHEME_HTTP,S_OK}, + {URLZONE_INVALID,E_NOTIMPL} + } + }, + /* Creates an IUri which contains an invalid dos path char. */ + { "file:///c:/test",0, + "/test