mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision b'49287d0e660dd6704c508ef20c9d53c13aee296b'
This commit is contained in:
parent
94c4e1cd1a
commit
d2eeed132b
76 changed files with 7672 additions and 5893 deletions
|
@ -100,7 +100,7 @@ function ReplyPromise(timestamp) {
|
|||
}
|
||||
|
||||
// Returns a promise that resolves when the given frame fires its load event.
|
||||
function ReloadPromise(frame) {
|
||||
function LoadPromise(frame) {
|
||||
return new Promise((resolve) => {
|
||||
frame.addEventListener("load", (event) => {
|
||||
resolve();
|
||||
|
@ -183,11 +183,19 @@ function ObservePermissionChange(frame, args = []) {
|
|||
// Executes `location.reload()` in the given frame. The returned promise
|
||||
// resolves when the frame has finished reloading.
|
||||
function FrameInitiatedReload(frame) {
|
||||
const reload = ReloadPromise(frame);
|
||||
const reload = LoadPromise(frame);
|
||||
frame.contentWindow.postMessage({ command: "reload" }, "*");
|
||||
return reload;
|
||||
}
|
||||
|
||||
// Executes `location.href = url` in the given frame. The returned promise
|
||||
// resolves when the frame has finished navigating.
|
||||
function FrameInitiatedNavigation(frame, url) {
|
||||
const load = LoadPromise(frame);
|
||||
frame.contentWindow.postMessage({ command: "navigate", url }, "*");
|
||||
return load;
|
||||
}
|
||||
|
||||
// Tries to set storage access policy, ignoring any errors.
|
||||
//
|
||||
// Note: to discourage the writing of tests that assume unpartitioned cookie
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue