|
1374 | 1374 | .then(t.step_func_done(), t.unreached_func()); |
1375 | 1375 | }, 'list-style-image sec-fetch-user'); |
1376 | 1376 |
|
| 1377 | + async_test((t) => { |
| 1378 | + const key = '{{uuid()}}'; |
| 1379 | + const url = makeRequestURL(key, ['httpsCrossSite']); |
| 1380 | + |
| 1381 | + declarations.push(`background-image: url("${url}");`); |
| 1382 | + |
| 1383 | + whenIframeReady |
| 1384 | + .then(() => retrieve(key)) |
| 1385 | + .then((headers) => { |
| 1386 | + assert_own_property(headers, 'sec-fetch-storage-access'); |
| 1387 | + assert_equals(headers['sec-fetch-storage-access'], 'none'); |
| 1388 | + }) |
| 1389 | + .then(t.step_func_done(), (error) => t.unreached_func()); |
| 1390 | + }, 'background-image sec-fetch-storage-access - Cross-site'); |
| 1391 | + |
| 1392 | + async_test((t) => { |
| 1393 | + const key = '{{uuid()}}'; |
| 1394 | + const url = makeRequestURL(key, ['httpsCrossSite']); |
| 1395 | + |
| 1396 | + declarations.push(`border-image: url("${url}");`); |
| 1397 | + |
| 1398 | + whenIframeReady |
| 1399 | + .then(() => retrieve(key)) |
| 1400 | + .then((headers) => { |
| 1401 | + assert_own_property(headers, 'sec-fetch-storage-access'); |
| 1402 | + assert_array_equals(headers['sec-fetch-storage-access'], ['none']); |
| 1403 | + }) |
| 1404 | + .then(t.step_func_done(), t.unreached_func()); |
| 1405 | + }, 'border-image sec-fetch-storage-access - Cross-site'); |
| 1406 | + |
| 1407 | + async_test((t) => { |
| 1408 | + const key = '{{uuid()}}'; |
| 1409 | + const url = makeRequestURL(key, ['httpsCrossSite']); |
| 1410 | + |
| 1411 | + declarations.push(`content: url("${url}");`); |
| 1412 | + |
| 1413 | + whenIframeReady |
| 1414 | + .then(() => retrieve(key)) |
| 1415 | + .then((headers) => { |
| 1416 | + assert_own_property(headers, 'sec-fetch-storage-access'); |
| 1417 | + assert_array_equals(headers['sec-fetch-storage-access'], ['none']); |
| 1418 | + }) |
| 1419 | + .then(t.step_func_done(), t.unreached_func()); |
| 1420 | + }, 'content sec-fetch-storage-access - Cross-site'); |
| 1421 | + |
| 1422 | + async_test((t) => { |
| 1423 | + const key = '{{uuid()}}'; |
| 1424 | + const url = makeRequestURL(key, ['httpsCrossSite']); |
| 1425 | + |
| 1426 | + declarations.push(`cursor: url("${url}"), auto;`); |
| 1427 | + |
| 1428 | + whenIframeReady |
| 1429 | + .then(() => retrieve(key)) |
| 1430 | + .then((headers) => { |
| 1431 | + assert_own_property(headers, 'sec-fetch-storage-access'); |
| 1432 | + assert_array_equals(headers['sec-fetch-storage-access'], ['none']); |
| 1433 | + }) |
| 1434 | + .then(t.step_func_done(), t.unreached_func()); |
| 1435 | + }, 'cursor sec-fetch-storage-access - Cross-site'); |
| 1436 | + |
| 1437 | + async_test((t) => { |
| 1438 | + const key = '{{uuid()}}'; |
| 1439 | + const url = makeRequestURL(key, ['httpsCrossSite']); |
| 1440 | + |
| 1441 | + declarations.push(`list-style-image: url("${url}");`); |
| 1442 | + |
| 1443 | + whenIframeReady |
| 1444 | + .then(() => retrieve(key)) |
| 1445 | + .then((headers) => { |
| 1446 | + assert_own_property(headers, 'sec-fetch-storage-access'); |
| 1447 | + assert_array_equals(headers['sec-fetch-storage-access'], ['none']); |
| 1448 | + }) |
| 1449 | + .then(t.step_func_done(), t.unreached_func()); |
| 1450 | + }, 'list-style-image sec-fetch-storage-access - Cross-site'); |
| 1451 | + |
| 1452 | + async_test((t) => { |
| 1453 | + const key = '{{uuid()}}'; |
| 1454 | + const url = makeRequestURL(key, ['httpsSameSite']); |
| 1455 | + |
| 1456 | + declarations.push(`background-image: url("${url}");`); |
| 1457 | + |
| 1458 | + whenIframeReady |
| 1459 | + .then(() => retrieve(key)) |
| 1460 | + .then((headers) => { |
| 1461 | + assert_not_own_property(headers, 'sec-fetch-storage-access'); |
| 1462 | + }) |
| 1463 | + .then(t.step_func_done(), (error) => t.unreached_func()); |
| 1464 | + }, 'background-image sec-fetch-storage-access - Same site'); |
| 1465 | + |
| 1466 | + async_test((t) => { |
| 1467 | + const key = '{{uuid()}}'; |
| 1468 | + const url = makeRequestURL(key, ['httpsSameSite']); |
| 1469 | + |
| 1470 | + declarations.push(`border-image: url("${url}");`); |
| 1471 | + |
| 1472 | + whenIframeReady |
| 1473 | + .then(() => retrieve(key)) |
| 1474 | + .then((headers) => { |
| 1475 | + assert_not_own_property(headers, 'sec-fetch-storage-access'); |
| 1476 | + }) |
| 1477 | + .then(t.step_func_done(), t.unreached_func()); |
| 1478 | + }, 'border-image sec-fetch-storage-access - Same site'); |
| 1479 | + |
| 1480 | + async_test((t) => { |
| 1481 | + const key = '{{uuid()}}'; |
| 1482 | + const url = makeRequestURL(key, ['httpsSameSite']); |
| 1483 | + |
| 1484 | + declarations.push(`content: url("${url}");`); |
| 1485 | + |
| 1486 | + whenIframeReady |
| 1487 | + .then(() => retrieve(key)) |
| 1488 | + .then((headers) => { |
| 1489 | + assert_not_own_property(headers, 'sec-fetch-storage-access'); |
| 1490 | + }) |
| 1491 | + .then(t.step_func_done(), t.unreached_func()); |
| 1492 | + }, 'content sec-fetch-storage-access - Same site'); |
| 1493 | + |
| 1494 | + async_test((t) => { |
| 1495 | + const key = '{{uuid()}}'; |
| 1496 | + const url = makeRequestURL(key, ['httpsSameSite']); |
| 1497 | + |
| 1498 | + declarations.push(`cursor: url("${url}"), auto;`); |
| 1499 | + |
| 1500 | + whenIframeReady |
| 1501 | + .then(() => retrieve(key)) |
| 1502 | + .then((headers) => { |
| 1503 | + assert_not_own_property(headers, 'sec-fetch-storage-access'); |
| 1504 | + }) |
| 1505 | + .then(t.step_func_done(), t.unreached_func()); |
| 1506 | + }, 'cursor sec-fetch-storage-access - Same site'); |
| 1507 | + |
| 1508 | + async_test((t) => { |
| 1509 | + const key = '{{uuid()}}'; |
| 1510 | + const url = makeRequestURL(key, ['httpsSameSite']); |
| 1511 | + |
| 1512 | + declarations.push(`list-style-image: url("${url}");`); |
| 1513 | + |
| 1514 | + whenIframeReady |
| 1515 | + .then(() => retrieve(key)) |
| 1516 | + .then((headers) => { |
| 1517 | + assert_not_own_property(headers, 'sec-fetch-storage-access'); |
| 1518 | + }) |
| 1519 | + .then(t.step_func_done(), t.unreached_func()); |
| 1520 | + }, 'list-style-image sec-fetch-storage-access - Same site'); |
| 1521 | + |
1377 | 1522 | iframe.srcdoc = declarations.map((declaration, index) => ` |
1378 | 1523 | <style>.el${index} { ${declaration} }</style><div class="el${index}"></div>` |
1379 | 1524 | ).join(''); |
|
0 commit comments