diff --git a/components/webdriver_server/actions.rs b/components/webdriver_server/actions.rs index 30006118156..1aa1c3fe609 100644 --- a/components/webdriver_server/actions.rs +++ b/components/webdriver_server/actions.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use std::collections::{HashMap, HashSet}; +use std::collections::HashSet; use std::thread; use std::time::{Duration, Instant}; @@ -42,9 +42,8 @@ pub(crate) enum ActionItem { } // A set of actions with multiple sources executed within a single tick. -// The order in which they are performed is not guaranteed. // The `id` is used to identify the source of the actions. -pub(crate) type TickActions = HashMap; +pub(crate) type TickActions = Vec<(String, ActionItem)>; // Consumed by the `dispatch_actions` method. pub(crate) type ActionsByTick = Vec; @@ -859,12 +858,12 @@ impl Handler { // Step 4.2.2. Ensure we have enough ticks to hold all actions while actions_by_tick.len() < source_actions.len() { - actions_by_tick.push(HashMap::new()); + actions_by_tick.push(Vec::new()); } // Step 4.2.3. for (tick_index, action_item) in source_actions.into_iter().enumerate() { - actions_by_tick[tick_index].insert(id.clone(), action_item); + actions_by_tick[tick_index].push((id.clone(), action_item)); } } diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index 8ae65c3cddb..3ed82e35871 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -2005,7 +2005,7 @@ impl Handler { .borrow_mut() .drain(..) .rev() - .map(|(id, action_item)| HashMap::from([(id, action_item)])) + .map(|(id, action_item)| Vec::from([(id, action_item)])) .collect(); // Step 7. Dispatch undo actions with current browsing context. if let Err(err) = self.dispatch_actions(undo_actions, session.browsing_context_id) { diff --git a/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_contextmenu.py.ini b/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_contextmenu.py.ini deleted file mode 100644 index b64bac15ff9..00000000000 --- a/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_contextmenu.py.ini +++ /dev/null @@ -1,6 +0,0 @@ -[pointer_contextmenu.py] - [test_control_click[\\ue009-ctrlKey\]] - expected: FAIL - - [test_control_click[\\ue051-ctrlKey\]] - expected: FAIL diff --git a/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_modifier_click.py.ini b/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_modifier_click.py.ini deleted file mode 100644 index 28c613a149c..00000000000 --- a/tests/wpt/meta/webdriver/tests/classic/perform_actions/pointer_modifier_click.py.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pointer_modifier_click.py] - [test_many_modifiers_click] - expected: FAIL