--- a/browser/base/content/test/general/browser_contentSearchUI.js
+++ b/browser/base/content/test/general/browser_contentSearchUI.js
@@ -295,38 +295,38 @@ add_task(async function mouse() {
state = await msg("mousemove", 0);
checkState(state, "x", ["xfoo", "xbar"], 0);
state = await msg("mousemove", 1);
checkState(state, "x", ["xfoo", "xbar"], 1);
state = await msg("mousemove", 2);
- checkState(state, "x", ["xfoo", "xbar"], 1, 0);
+ checkState(state, "x", ["xfoo", "xbar"], 2, 0);
state = await msg("mousemove", 3);
- checkState(state, "x", ["xfoo", "xbar"], 1, 1);
+ checkState(state, "x", ["xfoo", "xbar"], 3, 1);
state = await msg("mousemove", -1);
- checkState(state, "x", ["xfoo", "xbar"], 1);
+ checkState(state, "x", ["xfoo", "xbar"], -1);
await msg("reset");
await setUp();
state = await msg("key", { key: "x", waitForSuggestions: true });
checkState(state, "x", ["xfoo", "xbar"], -1);
state = await msg("mousemove", 0);
checkState(state, "x", ["xfoo", "xbar"], 0);
state = await msg("mousemove", 2);
- checkState(state, "x", ["xfoo", "xbar"], 0, 0);
+ checkState(state, "x", ["xfoo", "xbar"], 2, 0);
state = await msg("mousemove", -1);
- checkState(state, "x", ["xfoo", "xbar"], 0);
+ checkState(state, "x", ["xfoo", "xbar"], -1);
await msg("reset");
});
add_task(async function formHistory() {
await setUp();
// Type an X and add it to form history.
@@ -505,42 +505,26 @@ add_task(async function search() {
eventData.engineName = TEST_ENGINE_PREFIX + " " + TEST_ENGINE_2_BASENAME;
delete eventData.selection;
SimpleTest.isDeeply(eventData, mesg, "Search event data");
await promiseTab();
await setUp();
// Test selecting a suggestion, then clicking a one-off without deselecting the
- // suggestion.
- await msg("key", { key: "x", waitForSuggestions: true });
- p = msg("waitForSearch");
- await msg("mousemove", 1);
- await msg("mousemove", 3);
- await msg("click", { eltIdx: 3, modifiers });
- mesg = await p;
- eventData.searchString = "xfoo"
- eventData.selection = {
- index: 1,
- kind: "mouse",
- };
- SimpleTest.isDeeply(eventData, mesg, "Search event data");
-
- await promiseTab();
- await setUp();
-
- // Same as above, but with the keyboard.
+ // suggestion, using the keyboard.
delete modifiers.button;
await msg("key", { key: "x", waitForSuggestions: true });
p = msg("waitForSearch");
await msg("key", "VK_DOWN");
await msg("key", "VK_DOWN");
await msg("key", "VK_TAB");
await msg("key", { key: "VK_RETURN", modifiers });
mesg = await p;
+ eventData.searchString = "xfoo";
eventData.selection = {
index: 1,
kind: "key",
};
SimpleTest.isDeeply(eventData, mesg, "Search event data");
await promiseTab();
await setUp();