Commit 340e9d96 authored by Florian Quèze's avatar Florian Quèze
Browse files

Bug 1016342 - build translation by default, r=felipe.

parent f9e2511c
......@@ -18,6 +18,7 @@ PARALLEL_DIRS += [
'shell',
'sidebar',
'tabview',
'translation',
'migration',
]
......
......@@ -7,14 +7,17 @@
Components.utils.import("resource:///modules/translation/Translation.jsm");
const kLanguagesPref = "browser.translation.neverForLanguages";
const kShowUIPref = "browser.translation.ui.show";
function test() {
waitForExplicitFinish();
Services.prefs.setBoolPref(kShowUIPref, true);
let tab = gBrowser.addTab();
gBrowser.selectedTab = tab;
registerCleanupFunction(function () {
gBrowser.removeTab(tab);
Services.prefs.clearUserPref(kShowUIPref);
});
tab.linkedBrowser.addEventListener("load", function onload() {
tab.linkedBrowser.removeEventListener("load", onload, true);
......
......@@ -6,6 +6,8 @@
Components.utils.import("resource:///modules/translation/Translation.jsm");
const kShowUIPref = "browser.translation.ui.show";
function waitForCondition(condition, nextTest, errorMsg) {
var tries = 0;
var interval = setInterval(function() {
......@@ -68,6 +70,7 @@ function hasTranslationInfoBar() {
function test() {
waitForExplicitFinish();
Services.prefs.setBoolPref(kShowUIPref, true);
let tab = gBrowser.addTab();
gBrowser.selectedTab = tab;
tab.linkedBrowser.addEventListener("load", function onload() {
......@@ -75,6 +78,7 @@ function test() {
TranslationStub.browser = gBrowser.selectedBrowser;
registerCleanupFunction(function () {
gBrowser.removeTab(tab);
Services.prefs.clearUserPref(kShowUIPref);
});
run_tests(() => {
finish();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment