Add cross-origin case to Permissions-Policy: unload WPT.

Without this, if we update the default to EnabledForSelf, none of
the WPTs fail.

Bug: 1324111
Change-Id: I18006429151e1a24dc95fee150edcbf40e50e339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3989531
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064762}
diff --git a/permissions-policy/experimental-features/unload-allowed-by-default.tentative.window.js b/permissions-policy/experimental-features/unload-allowed-by-default.tentative.window.js
index 6db5291..3fdc9ed 100644
--- a/permissions-policy/experimental-features/unload-allowed-by-default.tentative.window.js
+++ b/permissions-policy/experimental-features/unload-allowed-by-default.tentative.window.js
@@ -1,5 +1,6 @@
 // META: title='unload' Policy : allowed by default
 // META: script=/common/dispatcher/dispatcher.js
+// META: script=/common/get-host-info.sub.js
 // META: script=/common/utils.js
 // META: script=/html/browsers/browsing-the-web/remote-context-helper/resources/remote-context-helper.js
 // META: script=./resources/unload-helper.js
@@ -13,7 +14,9 @@
       new RemoteContextHelper({scripts: ['./resources/unload-helper.js']});
   // In the same browsing context group to ensure BFCache is not used.
   const main = await rcHelper.addWindow();
-  const subframe = await main.addIframe();
-  await assertWindowRunsUnload(subframe, 'subframe', {shouldRunUnload: true});
+  const sameOriginSubframe = await main.addIframe();
+  const crossOriginSubframe = await main.addIframe({ origin: 'HTTP_REMOTE_ORIGIN' });
+  await assertWindowRunsUnload(sameOriginSubframe, 'sameOriginSubframe', { shouldRunUnload: true });
+  await assertWindowRunsUnload(crossOriginSubframe, 'crossOriginSubframe', { shouldRunUnload: true });
   await assertWindowRunsUnload(main, 'main', {shouldRunUnload: true});
 });