forked from kdashg/gecko-cinn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1925636 [wpt PR 48701] - Reland "Fenced frame: Fix some WPTs in h…
…eadless mode.", a=testonly Automatic update from web-platform-tests Reland "Fenced frame: Fix some WPTs in headless mode." (#48701) The original CL was crashing in an instance where multiClick() was invoked without an await. This fixes the crash by awaiting the clicks instead of continuing with/finishing the test before all the clicks have propagated inside navigate-ancestor-test-runner.https.html. Original change's description: > Fenced frame: Fix some WPTs in headless mode. > > There is currently a push to allow Chromium web platform tests to run > in headless mode (i.e. without a content shell). This requires some > changes to how fenced frame tests work. Headless mode does not support > test_driver functions from inside of fenced frames, as those require > access to the main frame's window to pass the message onto, which > fenced frames deliberately block for privacy reasons. This CL fixes > some of the tests that fail in headless mode by moving those > test_driver calls to the main frame, specifically clicking actions > (which we already have multiClick() to handle this in main frames), > and set_permission(). > > See the headless mode explainer: > https://chromium.googlesource.com/chromium/src/+/HEAD/headless/README.md > > Change-Id: Iab82a581b67f8f8851c7716a2d72caf566f3b2ae > Bug: 366257368 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5935060 > Reviewed-by: Andrew Verge <[email protected]> > Commit-Queue: Liam Brady <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1370151} Bug: 366257368 Change-Id: Id998687c2f3de41a7b0dcd5197ba74fb22ef979e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5938155 Reviewed-by: Andrew Verge <[email protected]> Commit-Queue: Liam Brady <[email protected]> Cr-Commit-Position: refs/heads/main@{#1370703} Co-authored-by: Liam Brady <[email protected]> -- wpt-commits: f50cf7fbd84ccdf90f6973b8ce7d75175adb3dc1 wpt-pr: 48701
- Loading branch information
1 parent
742c7d7
commit 7394a2f
Showing
21 changed files
with
88 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
3 changes: 0 additions & 3 deletions
3
testing/web-platform/tests/fenced-frame/resources/sandboxed-features-inner.sub.html
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
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
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
38 changes: 18 additions & 20 deletions
38
testing/web-platform/tests/fenced-frame/resources/web-bluetooth-inner.html
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 |
---|---|---|
@@ -1,33 +1,31 @@ | ||
<!DOCTYPE html> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="utils.js"></script> | ||
<title>Fenced frame content to test Web Bluetooth</title> | ||
|
||
<body> | ||
<button id="button">Button</button> | ||
<script> | ||
(async () => { | ||
await simulateGesture(); | ||
const [bluetooth_request_device_key] = parseKeylist(); | ||
try { | ||
await navigator.bluetooth.requestDevice({filters: [{name: 'device'}]}); | ||
writeValueToServer(bluetooth_request_device_key, | ||
'Web Bluetooth requestDevice() succeeded'); | ||
} catch(e) { | ||
if (e.name == 'NotAllowedError' && | ||
e.message.includes( | ||
'Web Bluetooth is not allowed in a fenced frame tree.')) { | ||
document.addEventListener("click", async () => { | ||
const [bluetooth_request_device_key] = parseKeylist(); | ||
try { | ||
await navigator.bluetooth.requestDevice({filters: [{name: 'device'}]}); | ||
writeValueToServer(bluetooth_request_device_key, | ||
'Web Bluetooth requestDevice() failed'); | ||
} else { | ||
writeValueToServer( | ||
bluetooth_request_device_key, | ||
'Web Bluetooth requestDevice() failed with unknown error - ' + | ||
`${e.name}: ${e.message}`); | ||
'Web Bluetooth requestDevice() succeeded'); | ||
} catch(e) { | ||
if (e.name == 'NotAllowedError' && | ||
e.message.includes( | ||
'Web Bluetooth is not allowed in a fenced frame tree.')) { | ||
writeValueToServer(bluetooth_request_device_key, | ||
'Web Bluetooth requestDevice() failed'); | ||
} else { | ||
writeValueToServer( | ||
bluetooth_request_device_key, | ||
'Web Bluetooth requestDevice() failed with unknown error - ' + | ||
`${e.name}: ${e.message}`); | ||
} | ||
} | ||
} | ||
}); | ||
})(); | ||
</script> | ||
</body> |
20 changes: 9 additions & 11 deletions
20
testing/web-platform/tests/fenced-frame/resources/web-share-inner.html
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 |
---|---|---|
@@ -1,21 +1,19 @@ | ||
<!DOCTYPE html> | ||
<script src="/resources/testdriver.js"></script> | ||
<script src="/resources/testdriver-actions.js"></script> | ||
<script src="/resources/testdriver-vendor.js"></script> | ||
<script src="utils.js"></script> | ||
<title>Fenced frame content to test Web Share</title> | ||
|
||
<body> | ||
<script> | ||
(async () => { | ||
await simulateGesture(); | ||
const [navigator_share_key] = parseKeylist(); | ||
try { | ||
await navigator.share({text: 'hello world'}); | ||
writeValueToServer(navigator_share_key, 'Web Share succeeded'); | ||
} catch(error) { | ||
writeValueToServer(navigator_share_key, 'Web Share failed'); | ||
} | ||
document.addEventListener("click", async () => { | ||
const [navigator_share_key] = parseKeylist(); | ||
try { | ||
await navigator.share({text: 'hello world'}); | ||
writeValueToServer(navigator_share_key, 'Web Share succeeded'); | ||
} catch(error) { | ||
writeValueToServer(navigator_share_key, 'Web Share failed'); | ||
} | ||
}); | ||
})(); | ||
</script> | ||
</body> |
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
Oops, something went wrong.