sandbox-top-navigation-grandchild-frame-allow-top.tentative.sub.window.js (859B)
1 // META: title=Top-level navigation tests with frames that try to give themselves top-nav permission 2 // META: script=/common/dispatcher/dispatcher.js 3 // META: script=/common/get-host-info.sub.js 4 // META: script=/common/utils.js 5 // META: script=/resources/testdriver.js 6 // META: script=/resources/testdriver-vendor.js 7 // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js 8 // META: script=./resources/sandbox-top-navigation-helper.sub.js 9 10 'use strict'; 11 12 promise_test(async t => { 13 const main = await setupTest(); 14 const iframe_1 = await createNestedIframe(main, 'HTTP_ORIGIN', '', ''); 15 const iframe_2 = await createNestedIframe( 16 iframe_1, 'HTTP_ORIGIN', 'allow-top-navigation', ''); 17 18 await attemptTopNavigation(iframe_2, true); 19 }, 'A same-origin grandchild with frame allow-top can navigate top');