-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow RemoteContextHelper to open windows from remote contexts (#48159)
There will be multiple tests in followup CLs that will need to open windows from existing windows and frames. This will allow to simplify those tests. Example usage: https://crrev.com/c/5841474 Bug: 340606651 Bug: b/365144247 Change-Id: I47f4d8c473fe69bc72e2c9345c0d5825451431e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5838815 Commit-Queue: Ari Chivukula <[email protected]> Reviewed-by: Fergal Daly <[email protected]> Reviewed-by: Ari Chivukula <[email protected]> Cr-Commit-Position: refs/heads/main@{#1355331} Co-authored-by: Sandor Major <[email protected]>
- Loading branch information
1 parent
307a251
commit ffc8a3a
Showing
2 changed files
with
49 additions
and
6 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
html/browsers/browsing-the-web/remote-context-helper-tests/addWindow-from-window.window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// META: title=RemoteContextHelper with defaults | ||
// 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/test-helper.js | ||
|
||
'use strict'; | ||
|
||
promise_test(async t => { | ||
const rcHelper = new RemoteContextHelper(); | ||
const main = await rcHelper.addWindow(); | ||
const childWindow = await main.addWindow(); | ||
await assertSimplestScriptRuns(childWindow); | ||
await assertOriginIsAsExpected(childWindow, location.origin); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters