mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-08 04:09:03 +02:00
This adds tests for issues brought up in bug 231393, bug 264610, bug 302575 and bug 1129564, all of which fed into the current implementation of userTypedClear/userTypedValue. I intend to move us away from userTypedClear, but I'm keen not to regress any of these issues, so I'm adding automated tests to ensure that doesn't happen. MozReview-Commit-ID: 1up2MIXzkzG --HG-- extra : rebase_source : 4d37f13895b8c7e7aba5331664718582c6b2136c
17 lines
690 B
JavaScript
17 lines
690 B
JavaScript
"use strict";
|
|
|
|
/**
|
|
* Disable keyword.enabled (so no keyword search), and check that when you type in
|
|
* "example" and hit enter, the browser loads and the URL bar is updated accordingly.
|
|
*/
|
|
add_task(function* () {
|
|
yield new Promise(resolve => SpecialPowers.pushPrefEnv({set: [["keyword.enabled", false]]}, resolve));
|
|
yield BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, function* (browser) {
|
|
gURLBar.value = "example";
|
|
gURLBar.select();
|
|
let loadPromise = BrowserTestUtils.browserLoaded(browser, false, url => url == "http://www.example.com/");
|
|
EventUtils.sendKey("return");
|
|
yield loadPromise;
|
|
is(gURLBar.textValue, "www.example.com");
|
|
});
|
|
});
|