зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1232548
- Test-only change, trying to fix intermittent leak in urlbar search suggestions tests on Aurora. r=me a=test-only CLOSED TREE
--HG-- extra : commitid : ErYCBI0H2Dw extra : source : 1ba4f6d91e637348dc0cdc7e9d311c4cddbc8a5e
This commit is contained in:
Родитель
b59fb1201d
Коммит
b0c3f13b42
|
@ -22,6 +22,7 @@ add_task(function* prepare() {
|
|||
});
|
||||
|
||||
add_task(function* clickSuggestion() {
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gURLBar.focus();
|
||||
yield promiseAutocompleteResultPopup("foo");
|
||||
let [idx, suggestion] = yield promiseFirstSuggestion();
|
||||
|
@ -32,6 +33,7 @@ add_task(function* clickSuggestion() {
|
|||
let uri = Services.search.currentEngine.getSubmission(suggestion).uri;
|
||||
Assert.ok(uri.equals(gBrowser.currentURI),
|
||||
"The search results page should have loaded");
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
|
||||
function getFirstSuggestion() {
|
||||
|
|
|
@ -27,6 +27,7 @@ add_task(function* prepare() {
|
|||
|
||||
add_task(function* heuristicResult() {
|
||||
yield compareCounts(function* () {
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
yield promiseAutocompleteResultPopup("heuristicResult");
|
||||
let action = getActionAtIndex(0);
|
||||
Assert.ok(!!action, "there should be an action at index 0");
|
||||
|
@ -35,11 +36,13 @@ add_task(function* heuristicResult() {
|
|||
let loadPromise = promiseTabLoaded(gBrowser.selectedTab);
|
||||
item.click();
|
||||
yield loadPromise;
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
});
|
||||
|
||||
add_task(function* searchSuggestion() {
|
||||
yield compareCounts(function* () {
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
yield promiseAutocompleteResultPopup("searchSuggestion");
|
||||
let idx = getFirstSuggestionIndex();
|
||||
Assert.ok(idx >= 0, "there should be a first suggestion");
|
||||
|
@ -47,6 +50,7 @@ add_task(function* searchSuggestion() {
|
|||
let loadPromise = promiseTabLoaded(gBrowser.selectedTab);
|
||||
item.click();
|
||||
yield loadPromise;
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
|
||||
<ShortName>browser_searchSuggestionEngine searchSuggestionEngine.xml</ShortName>
|
||||
<Url type="application/x-suggestions+json" method="GET" template="http://mochi.test:8888/browser/browser/base/content/test/general/searchSuggestionEngine.sjs?{searchTerms}"/>
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/browser/browser/base/content/test/general/searchSuggestionEngine.sjs?{searchTerms}" rel="searchform"/>
|
||||
<Url type="text/html" method="GET" template="http://mochi.test:8888/" rel="searchform"/>
|
||||
</SearchPlugin>
|
||||
|
|
Загрузка…
Ссылка в новой задаче