In running a ported browser_urlbarDelete.js test on try, I noticed that it is currently failing on Linux and Windows.
The basic issue appears to be:
- Start entering something that completes
- Press the Home button to get to the start of text
- Press the Delete button
At this stage, we're attempting to delete the autofill entry which fails, because it sees the selectedIndex as 0 and therefore fails the incorrect
I'm not sure this should be attempting to delete the history entry, I think it should just let it go and let the text be deleted.
I don't know how the old address bar handles this - it implies the selected index might be -1 to begin with, though I'm not quite sure.
In any case, we should fix this, bug 1525439 has ported the test but disabled it on non-Mac for now.
TEST-PASS | browser/components/urlbar/tests/browser/browser_urlbarDelete.js | "ug1105244.example.com/" == "ug1105244.example.com/" -
Buffered messages finished
TEST-UNEXPECTED-FAIL | browser/components/urlbar/tests/browser/browser_urlbarDelete.js | "ug1105244.example.com/" == "g1105244.example.com/" - JS frame :: chrome://mochitests/content/browser/browser/components/urlbar/tests/browser/browser_urlbarDelete.js :: testDelete :: line 47