mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
Webdriver GoBack and GoForward commands wait for navigation complete (#37950)
After sending `GoBack` or `GoForward` command, webdriver wait for the navigation complete. It can be achieved by waiting for `WebViewDelegate::notify_history_changed` Testing: `tests/wpt/meta/webdriver/tests/classic/back/back.py` `tests/wpt/meta/webdriver/tests/classic/forward/forward.py` --------- Signed-off-by: batu_hoang <longvatrong111@gmail.com> Signed-off-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: batu_hoang <hoang.binh.trong@huawei.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
c817d7b9ce
commit
8e2d2bde6f
16 changed files with 114 additions and 40 deletions
|
@ -1378,8 +1378,17 @@ where
|
|||
self.embedder_proxy.send(EmbedderMsg::WebViewBlurred);
|
||||
},
|
||||
// Handle a forward or back request
|
||||
EmbedderToConstellationMessage::TraverseHistory(webview_id, direction) => {
|
||||
EmbedderToConstellationMessage::TraverseHistory(
|
||||
webview_id,
|
||||
direction,
|
||||
traversal_id,
|
||||
) => {
|
||||
self.handle_traverse_history_msg(webview_id, direction);
|
||||
self.embedder_proxy
|
||||
.send(EmbedderMsg::HistoryTraversalComplete(
|
||||
webview_id,
|
||||
traversal_id,
|
||||
));
|
||||
},
|
||||
EmbedderToConstellationMessage::ChangeViewportDetails(
|
||||
webview_id,
|
||||
|
|
|
@ -214,6 +214,7 @@ mod from_script {
|
|||
Self::SetCursor(..) => target_variant!("SetCursor"),
|
||||
Self::NewFavicon(..) => target_variant!("NewFavicon"),
|
||||
Self::HistoryChanged(..) => target_variant!("HistoryChanged"),
|
||||
Self::HistoryTraversalComplete(..) => target_variant!("HistoryTraversalComplete"),
|
||||
Self::GetWindowRect(..) => target_variant!("GetWindowRect"),
|
||||
Self::GetScreenMetrics(..) => target_variant!("GetScreenMetrics"),
|
||||
Self::NotifyFullscreenStateChanged(..) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue