зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479744 - Clear search history to prevent TV perma fail for browser/base/content/test/about/browser_aboutHome_search_composing.js r=adw
Differential Revision: https://phabricator.services.mozilla.com/D14769 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
496dff9a8b
Коммит
9de5fec37d
|
@ -15,6 +15,22 @@ add_task(async function() {
|
|||
Services.search.defaultEngine = engine;
|
||||
await p;
|
||||
|
||||
// Clear any search history results
|
||||
await new Promise((resolve, reject) => {
|
||||
FormHistory.update({op: "remove"}, {
|
||||
handleError(error) {
|
||||
reject(error);
|
||||
},
|
||||
handleCompletion(reason) {
|
||||
if (!reason) {
|
||||
resolve();
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
await ContentTask.spawn(browser, null, async function() {
|
||||
// Start composition and type "x"
|
||||
let input = content.document.querySelector(["#searchText", "#newtab-search-text"]);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
/* eslint-env mozilla/frame-script */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetters(this, {
|
||||
FormHistory: "resource://gre/modules/FormHistory.jsm",
|
||||
});
|
||||
|
||||
function injectErrorPageFrame(tab, src) {
|
||||
return ContentTask.spawn(tab.linkedBrowser, {frameSrc: src}, async function({frameSrc}) {
|
||||
let loaded = ContentTaskUtils.waitForEvent(content.wrappedJSObject, "DOMFrameContentLoaded");
|
||||
|
|
Загрузка…
Ссылка в новой задаче