292{
296
297 hres = IUnknown_QueryInterface(unk, &IID_IObjectSafety, (
void**)&safety);
300 return;
301
302 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &
IID_NULL, &supported,
NULL);
303 ok(
hres ==
E_POINTER,
"GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n",
hres);
305 ok(
hres ==
E_POINTER,
"GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n",
hres);
306
307 supported =
enabled = 0xdeadbeef;
309 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
310 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
311 "supported=%x\n", supported);
313
314 supported =
enabled = 0xdeadbeef;
315 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScript, &supported, &
enabled);
316 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
317 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
318 "supported=%x\n", supported);
320
321 supported =
enabled = 0xdeadbeef;
322 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
323 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
324 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
325 "supported=%x\n", supported);
327
328 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
329 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER
330 |INTERFACESAFE_FOR_UNTRUSTED_CALLER,
331 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER);
332 ok(
hres ==
E_FAIL,
"SetInterfaceSafetyOptions failed: %08x, expected E_FAIL\n",
hres);
333
334 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
335 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER,
336 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER);
337 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
338
339 supported =
enabled = 0xdeadbeef;
340 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
341 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
342 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
343 "supported=%x\n", supported);
344 ok(
enabled == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
346
347 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA, 0);
348 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
349
350 supported =
enabled = 0xdeadbeef;
351 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
352 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
353 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
354 "supported=%x\n", supported);
355 ok(
enabled == (INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
"enabled=%x\n",
enabled);
356
357 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
358 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, 0);
359 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
360
361 supported =
enabled = 0xdeadbeef;
362 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
363 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
364 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
365 "supported=%x\n", supported);
367
368 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
369 INTERFACE_USES_DISPEX, 0);
370 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
371
372 supported =
enabled = 0xdeadbeef;
373 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
374 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
375 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
376 "supported=%x\n", supported);
378
379 IObjectSafety_Release(safety);
380}
GLenum GLenum GLsizei const GLuint GLboolean enabled