Commit b7694d8d authored by Thomas Mullaly's avatar Thomas Mullaly Committed by Alexandre Julliard

urlmon: Added basic implementation for CoInternet{Is/Set}FeatureEnabled.

parent 985aebd5
......@@ -1532,7 +1532,6 @@ static void test_internet_features_registry(void) {
ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res);
hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS);
todo_wine
ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres);
if(delete_feature_key) {
......@@ -1545,12 +1544,10 @@ static void test_internet_features_registry(void) {
/* IE's feature control cached the value it got from the registry earlier. */
hres = pCoInternetIsFeatureEnabled(FEATURE_BEHAVIORS, GET_FEATURE_FROM_PROCESS);
todo_wine
ok(hres == S_FALSE, "CoInternetIsFeatureEnabled returned %08x, expected S_FALSE\n", hres);
/* Restore this feature back to its default value. */
hres = pCoInternetSetFeatureEnabled(FEATURE_BEHAVIORS, SET_FEATURE_ON_PROCESS, TRUE);
todo_wine
ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres);
RegCloseKey(feature_control);
......@@ -1568,7 +1565,6 @@ static void test_internet_features_registry(void) {
ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res);
hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS);
todo_wine
ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres);
RegDeleteValueA(feature, "*");
......@@ -1577,11 +1573,9 @@ static void test_internet_features_registry(void) {
/* Value is still cached from last time. */
hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS);
todo_wine
ok(hres == S_OK, "CoInternetIsFeatureEnabled returned %08x, expected S_OK\n", hres);
hres = pCoInternetSetFeatureEnabled(FEATURE_ZONE_ELEVATION, SET_FEATURE_ON_PROCESS, FALSE);
todo_wine
ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres);
}
......@@ -1591,34 +1585,34 @@ static const struct {
HRESULT expected;
BOOL todo;
} default_feature_tests[] = {
{FEATURE_OBJECT_CACHING,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_ZONE_ELEVATION,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_MIME_HANDLING,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_MIME_SNIFFING,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_WINDOW_RESTRICTIONS,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_WEBOC_POPUPMANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_BEHAVIORS,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_DISABLE_MK_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_LOCALMACHINE_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_SECURITYBAND,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_RESTRICT_ACTIVEXINSTALL,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_VALIDATE_NAVIGATE_URL,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_RESTRICT_FILEDOWNLOAD,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_ADDON_MANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_PROTOCOL_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_HTTP_USERNAME_PASSWORD_DISABLE,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_SAFE_BINDTOOBJECT,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_UNC_SAVEDFILECHECK,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_GET_URL_DOM_FILEPATH_UNENCODED,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_TABBED_BROWSING,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_SSLUX,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_DISABLE_NAVIGATION_SOUNDS,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_DISABLE_LEGACY_COMPRESSION,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_FORCE_ADDR_AND_STATUS,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_XMLHTTP,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_DISABLE_TELNET_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_FEEDS,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_BLOCK_INPUT_PROMPTS,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE}
{FEATURE_OBJECT_CACHING,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_ZONE_ELEVATION,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_MIME_HANDLING,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_MIME_SNIFFING,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_WINDOW_RESTRICTIONS,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_WEBOC_POPUPMANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_BEHAVIORS,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_DISABLE_MK_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_LOCALMACHINE_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_SECURITYBAND,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_RESTRICT_ACTIVEXINSTALL,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_VALIDATE_NAVIGATE_URL,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_RESTRICT_FILEDOWNLOAD,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_ADDON_MANAGEMENT,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_PROTOCOL_LOCKDOWN,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_HTTP_USERNAME_PASSWORD_DISABLE,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_SAFE_BINDTOOBJECT,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_UNC_SAVEDFILECHECK,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_GET_URL_DOM_FILEPATH_UNENCODED,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_TABBED_BROWSING,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_SSLUX,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_DISABLE_NAVIGATION_SOUNDS,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_DISABLE_LEGACY_COMPRESSION,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_FORCE_ADDR_AND_STATUS,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_XMLHTTP,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_DISABLE_TELNET_PROTOCOL,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_FEEDS,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_BLOCK_INPUT_PROMPTS,GET_FEATURE_FROM_PROCESS,S_FALSE}
};
static void test_internet_feature_defaults(void) {
......@@ -1644,7 +1638,6 @@ static void test_CoInternetIsFeatureEnabled(void) {
test_internet_feature_defaults();
hres = pCoInternetIsFeatureEnabled(FEATURE_ENTRY_COUNT, GET_FEATURE_FROM_PROCESS);
todo_wine
ok(hres == E_FAIL, "CoInternetIsFeatureEnabled returned %08x, expected E_FAIL\n", hres);
}
......@@ -1658,9 +1651,9 @@ static const struct {
HRESULT get_expected;
BOOL get_todo;
} internet_feature_tests[] = {
{FEATURE_OBJECT_CACHING,SET_FEATURE_ON_PROCESS,FALSE,S_OK,TRUE,GET_FEATURE_FROM_PROCESS,S_FALSE,TRUE},
{FEATURE_WEBOC_POPUPMANAGEMENT,SET_FEATURE_ON_PROCESS,TRUE,S_OK,TRUE,GET_FEATURE_FROM_PROCESS,S_OK,TRUE},
{FEATURE_LOCALMACHINE_LOCKDOWN,SET_FEATURE_ON_PROCESS,TRUE,S_OK,TRUE,GET_FEATURE_FROM_PROCESS,S_OK,TRUE}
{FEATURE_OBJECT_CACHING,SET_FEATURE_ON_PROCESS,FALSE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_FALSE},
{FEATURE_WEBOC_POPUPMANAGEMENT,SET_FEATURE_ON_PROCESS,TRUE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_OK},
{FEATURE_LOCALMACHINE_LOCKDOWN,SET_FEATURE_ON_PROCESS,TRUE,S_OK,FALSE,GET_FEATURE_FROM_PROCESS,S_OK}
};
static void test_CoInternetSetFeatureEnabled(void) {
......@@ -1668,7 +1661,6 @@ static void test_CoInternetSetFeatureEnabled(void) {
DWORD i;
hres = pCoInternetSetFeatureEnabled(FEATURE_ENTRY_COUNT,SET_FEATURE_ON_PROCESS,TRUE);
todo_wine
ok(hres == E_FAIL, "CoInternetSetFeatureEnabled returned %08x, expected E_FAIL\n", hres);
for(i = 0; i < sizeof(internet_feature_tests)/sizeof(internet_feature_tests[0]); ++i) {
......
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