333{
337
338 hres = IActiveScript_QueryInterface(
script, &IID_IObjectSafety, (
void**)&safety);
341 return;
342
343 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &
IID_NULL, &supported,
NULL);
344 ok(
hres ==
E_POINTER,
"GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n",
hres);
346 ok(
hres ==
E_POINTER,
"GetInterfaceSafetyOptions failed: %08x, expected E_POINTER\n",
hres);
347
348 supported =
enabled = 0xdeadbeef;
350 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
351 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
352 "supported=%x\n", supported);
354
355 supported =
enabled = 0xdeadbeef;
356 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScript, &supported, &
enabled);
357 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
358 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
359 "supported=%x\n", supported);
361
362 supported =
enabled = 0xdeadbeef;
363 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
364 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
365 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
366 "supported=%x\n", supported);
368
369 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
370 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER
371 |INTERFACESAFE_FOR_UNTRUSTED_CALLER,
372 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER);
373 ok(
hres ==
E_FAIL,
"SetInterfaceSafetyOptions failed: %08x, expected E_FAIL\n",
hres);
374
375 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
376 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER,
377 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER);
378 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
379
380 supported =
enabled = 0xdeadbeef;
381 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
382 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
383 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
384 "supported=%x\n", supported);
385 ok(
enabled == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
387
388 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, INTERFACESAFE_FOR_UNTRUSTED_DATA, 0);
389 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
390
391 supported =
enabled = 0xdeadbeef;
392 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
393 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
394 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
395 "supported=%x\n", supported);
396 ok(
enabled == (INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
"enabled=%x\n",
enabled);
397
398 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
399 INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER, 0);
400 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
401
402 supported =
enabled = 0xdeadbeef;
403 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
404 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
405 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
406 "supported=%x\n", supported);
408
409 hres = IObjectSafety_SetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse,
410 INTERFACE_USES_DISPEX, 0);
411 ok(
hres ==
S_OK,
"SetInterfaceSafetyOptions failed: %08x\n",
hres);
412
413 supported =
enabled = 0xdeadbeef;
414 hres = IObjectSafety_GetInterfaceSafetyOptions(safety, &IID_IActiveScriptParse, &supported, &
enabled);
415 ok(
hres ==
S_OK,
"GetInterfaceSafetyOptions failed: %08x\n",
hres);
416 ok(supported == (INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_DISPEX|INTERFACE_USES_SECURITY_MANAGER),
417 "supported=%x\n", supported);
419
420 IObjectSafety_Release(safety);
421}
GLenum GLenum GLsizei const GLuint GLboolean enabled