Bug 1522486 - Perma-failing TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js | Test timed out when Gecko 66 merges to Beta on 2019-01-21 r=nanj

MozReview-Commit-ID: EuTmKnnYZtr

Differential Revision: https://phabricator.services.mozilla.com/D17513

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ricky Rosario 2019-01-24 20:35:24 +00:00
parent 03887afb69
commit 541c57ef5c

View File

@ -44,6 +44,17 @@ async function testLinkOpensUrl({ win, tab, elementId, expectedUrl }) {
`Clicking ${elementId} opened ${expectedUrl} in the same tab.`);
}
/**
* Enables the searchUI pref.
*/
function enableSearchUI() {
Services.prefs.setBoolPref("browser.privatebrowsing.searchUI", true);
registerCleanupFunction(function() {
Services.prefs.clearUserPref("browser.privatebrowsing.searchUI");
});
}
/**
* Tests the links in "about:privatebrowsing".
*/
@ -76,6 +87,7 @@ add_task(async function test_links() {
* Tests the private-browsing-myths link in "about:privatebrowsing".
*/
add_task(async function test_myths_link() {
enableSearchUI();
Services.prefs.setCharPref("app.support.baseURL", "https://example.com/");
registerCleanupFunction(function() {
Services.prefs.clearUserPref("app.support.baseURL");
@ -103,6 +115,7 @@ function urlBarHasNormalFocus(win) {
* Tests the search hand-off on character keydown in "about:privatebrowsing".
*/
add_task(async function test_search_handoff_on_keydown() {
enableSearchUI();
let { win, tab } = await openAboutPrivateBrowsing();
await ContentTask.spawn(tab, null, async function() {
@ -133,6 +146,7 @@ add_task(async function test_search_handoff_on_keydown() {
* Tests the search hand-off on composition start in "about:privatebrowsing".
*/
add_task(async function test_search_handoff_on_composition_start() {
enableSearchUI();
let { win, tab } = await openAboutPrivateBrowsing();
await ContentTask.spawn(tab, null, async function() {
@ -149,6 +163,7 @@ add_task(async function test_search_handoff_on_composition_start() {
* Tests the search hand-off on paste in "about:privatebrowsing".
*/
add_task(async function test_search_handoff_on_paste() {
enableSearchUI();
let { win, tab } = await openAboutPrivateBrowsing();
await ContentTask.spawn(tab, null, async function() {