cross-origin-nested-parent.sub.html (864B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Notification nested iframe third party parent</title> 4 <body> 5 <script src="/resources/testdriver.js"></script> 6 <script src="/resources/testdriver-vendor.js"></script> 7 <script type="module"> 8 import { permissionTest } from "./permission-helper.js" 9 10 // Grant the permission so that we can confirm the permission being denied 11 // regardless of the actual permission status. 12 test_driver.set_test_context(window.top); 13 await test_driver.set_permission({ name: "notifications" }, "granted"); 14 15 const firstPartyOrigin = 'https://{{hosts[][]}}:{{ports[https][0]}}'; 16 17 permissionTest(firstPartyOrigin, "parent"); 18 19 const nestedChild = 20 `${firstPartyOrigin}/notifications/resources/cross-origin-nested-child.sub.html`; 21 const iframe = document.createElement("iframe"); 22 iframe.src = nestedChild; 23 document.body.append(iframe); 24 </script>