lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

March 2025

  • 1 participants
  • 234 discussions
[Git][tpo/applications/tor-browser][tor-browser-128.8.0esr-14.5-1] fixup! TB 7494: Create local home page for TBB.
by morgan (@morgan) 10 Mar '25

10 Mar '25
morgan pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: dce8efc3 by Henry Wilkes at 2025-03-10T13:03:54+00:00 fixup! TB 7494: Create local home page for TBB. TB 43489: Add a survey banner in about:tor. - - - - - 8 changed files: - browser/components/BrowserGlue.sys.mjs - browser/components/abouttor/AboutTorChild.sys.mjs - browser/components/abouttor/AboutTorParent.sys.mjs - + browser/components/abouttor/content/1f44b-waving-hand.svg - browser/components/abouttor/content/aboutTor.css - browser/components/abouttor/content/aboutTor.html - browser/components/abouttor/content/aboutTor.js - browser/components/abouttor/jar.mn Changes: ===================================== browser/components/BrowserGlue.sys.mjs ===================================== @@ -524,6 +524,7 @@ let JSWINDOWACTORS = { DOMContentLoaded: {}, L10nMutationsFinished: {}, SubmitSearchOnionize: { wantUntrusted: true }, + SurveyDismissed: { wantUntrusted: true }, }, }, ===================================== browser/components/abouttor/AboutTorChild.sys.mjs ===================================== @@ -16,6 +16,10 @@ export class AboutTorChild extends JSWindowActorChild { case "SubmitSearchOnionize": this.sendAsyncMessage("AboutTor:SetSearchOnionize", !!event.detail); break; + case "SurveyDismissed": + // event.detail is the survey version. + this.sendAsyncMessage("AboutTor:SurveyDismissed", event.detail); + break; case "L10nMutationsFinished": // Pass on chrome-only event for completed localization to content. this.contentWindow.dispatchEvent( ===================================== browser/components/abouttor/AboutTorParent.sys.mjs ===================================== @@ -13,6 +13,8 @@ ChromeUtils.defineESModuleGetters(lazy, { export class AboutTorParent extends JSWindowActorParent { receiveMessage(message) { const onionizePref = "torbrowser.homepage.search.onionize"; + const surveyDismissVersionPref = + "torbrowser.homepage.survey.dismiss_version"; switch (message.name) { case "AboutTor:GetInitialData": return Promise.resolve({ @@ -20,10 +22,26 @@ export class AboutTorParent extends JSWindowActorParent { messageData: lazy.AboutTorMessage.getNext(), isStable: AppConstants.MOZ_UPDATE_CHANNEL === "release", searchOnionize: Services.prefs.getBoolPref(onionizePref, false), + surveyDismissVersion: Services.prefs.getIntPref( + surveyDismissVersionPref, + 0 + ), }); case "AboutTor:SetSearchOnionize": Services.prefs.setBoolPref(onionizePref, message.data); break; + case "AboutTor:SurveyDismissed": + // The message.data contains the version of the current survey. + // Rather than introduce a new preference for each survey campaign we + // reuse the same integer preference and increase its value every time + // a new version of the survey is shown and dismissed by the user. + // I.e. if the preference value is 2, we will not show survey version 2 + // but will show survey version 3 or higher when they are introduced. + // It should be safe to overwrite the value since we do not expect more + // than one active survey campaign at any given time, nor do we expect + // the version value to decrease. + Services.prefs.setIntPref(surveyDismissVersionPref, message.data); + break; } return undefined; } ===================================== browser/components/abouttor/content/1f44b-waving-hand.svg ===================================== @@ -0,0 +1,3 @@ +<!-- FROM https://github.com/twitter/twemoji + - licensed under CC-BY 4.0: https://creativecommons.org/licenses/by/4.0/ --> +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#EF9645" d="M4.861 9.147c.94-.657 2.357-.531 3.201.166l-.968-1.407c-.779-1.111-.5-2.313.612-3.093 1.112-.777 4.263 1.312 4.263 1.312-.786-1.122-.639-2.544.483-3.331 1.122-.784 2.67-.513 3.456.611l10.42 14.72L25 31l-11.083-4.042L4.25 12.625c-.793-1.129-.519-2.686.611-3.478z"/><path fill="#FFDC5D" d="M2.695 17.336s-1.132-1.65.519-2.781c1.649-1.131 2.78.518 2.78.518l5.251 7.658c.181-.302.379-.6.6-.894L4.557 11.21s-1.131-1.649.519-2.78c1.649-1.131 2.78.518 2.78.518l6.855 9.997c.255-.208.516-.417.785-.622L7.549 6.732s-1.131-1.649.519-2.78c1.649-1.131 2.78.518 2.78.518l7.947 11.589c.292-.179.581-.334.871-.498L12.238 4.729s-1.131-1.649.518-2.78c1.649-1.131 2.78.518 2.78.518l7.854 11.454 1.194 1.742c-4.948 3.394-5.419 9.779-2.592 13.902.565.825 1.39.26 1.39.26-3.393-4.949-2.357-10.51 2.592-13.903L24.515 8.62s-.545-1.924 1.378-2.47c1.924-.545 2.47 1.379 2.47 1.379l1.685 5.004c.668 1.984 1.379 3.961 2.32 5.831 2.657 5.28 1.07 11.842-3.94 15.279-5.465 3.747-12.936 2.354-16.684-3.11L2.695 17.336z"/><g fill="#5DADEC"><path d="M12 32.042C8 32.042 3.958 28 3.958 24c0-.553-.405-1-.958-1s-1.042.447-1.042 1C1.958 30 6 34.042 12 34.042c.553 0 1-.489 1-1.042s-.447-.958-1-.958z"/><path d="M7 34c-3 0-5-2-5-5 0-.553-.447-1-1-1s-1 .447-1 1c0 4 3 7 7 7 .553 0 1-.447 1-1s-.447-1-1-1zM24 2c-.552 0-1 .448-1 1s.448 1 1 1c4 0 8 3.589 8 8 0 .552.448 1 1 1s1-.448 1-1c0-5.514-4-10-10-10z"/><path d="M29 .042c-.552 0-1 .406-1 .958s.448 1.042 1 1.042c3 0 4.958 2.225 4.958 4.958 0 .552.489 1 1.042 1s.958-.448.958-1C35.958 3.163 33 .042 29 .042z"/></g></svg> ===================================== browser/components/abouttor/content/aboutTor.css ===================================== @@ -13,6 +13,7 @@ body { "tor-check tor-check tor-check" auto ". form ." min-content "message message message" auto + "survey survey survey" auto /* End space: unfilled. * Reserve 150px for background image. * NOTE: Since the body has "auto" height, the other "1fr" flex row will @@ -58,20 +59,24 @@ body:not(.is-testing) #tor-browser-home-heading-testing { #tor-check { grid-area: tor-check; - max-width: var(--form-max-width); - box-sizing: border-box; display: flex; gap: 10px; align-items: center; padding-inline: 23px; padding-block: 11px; - border: 1px solid var(--in-content-box-border-color); border-radius: 8px; - background-color: var(--in-content-box-info-background); margin-block-start: 0; margin-block-end: 30px; } +.tor-home-box { + border: 1px solid var(--in-content-box-border-color); + background-color: var(--in-content-box-info-background); + max-width: var(--form-max-width); + width: -moz-available; + box-sizing: border-box; +} + body:not(.show-tor-check) #tor-check { display: none; } @@ -92,8 +97,7 @@ body:not(.show-tor-check) #tor-check { grid-area: message; font-weight: 400; text-align: center; - margin-block-start: 1.6em; - margin-block-end: 1em; + margin-block: 1.6em; } .message-emoji { @@ -173,6 +177,68 @@ body:not(.show-tor-check) #tor-check { margin-inline-start: 0.5em; } +#survey { + grid-area: survey; + display: grid; + grid-template: + "icon heading close" min-content + "icon body close" auto + ". buttons buttons" min-content + / min-content 1fr min-content; + border-radius: 4px; + /* Remove 1px from padding for border. */ + padding-block: 3px 11px; + padding-inline: 15px 3px; + gap: 8px; + margin-block-end: 1.6em; +} + +body:not(.show-survey) #survey { + display: none; +} + +#survey > * { + margin: 0; +} + +#survey-icon { + grid-area: icon; + width: 24px; + height: 24px; + padding: 8px; + border-radius: 20px; +} + +#survey-heading { + grid-area: heading; + font-size: inherit; +} + +#survey-icon, +#survey-heading { + margin-block-start: 8px; +} + +#survey-body { + grid-area: body; + margin-block-end: 8px; +} + +#survey-buttons { + grid-area: buttons; + display: flex; + gap: 8px; +} + +#survey-buttons > * { + flex: 0 0 auto; + margin: 0; +} + +#survey-close { + grid-area: close; +} + @media not ((prefers-contrast) or (forced-colors)) { /* Force the page to follow the same Tor theme, regardless of * prefers-color-scheme. */ @@ -196,6 +262,13 @@ body:not(.show-tor-check) #tor-check { body > :not(#search-form) { /* Same as --in-content-page-color when "prefers-color-scheme: dark" */ color: var(--color-gray-05); + --button-text-color: currentColor; + --in-content-button-text-color: var(--button-text-color); + --in-content-button-text-color-hover: var(--button-text-color); + --in-content-button-text-color-active: var(--button-text-color); + --button-text-color-ghost: var(--button-text-color); + --button-text-color-ghost-hover: var(--button-text-color); + --button-text-color-ghost-active: var(--button-text-color); --link-color: var(--tor-link-color-dark); --link-color-hover: var(--tor-link-color-hover-dark); --link-color-active: var(--tor-link-color-active-dark); @@ -234,4 +307,20 @@ body:not(.show-tor-check) #tor-check { #search-form.onionized-search #onionize-toggle { color: var(--tor-link-color-light); } + + #survey { + background-color: #3d1559; + border-color: transparent; + } + + #survey-icon { + background-color: #00000040; + } + + #survey-launch { + color: var(--color-gray-100); + --in-content-primary-button-background: var(--tor-button-background-color-dark); + --in-content-primary-button-background-hover: var(--tor-button-background-color-hover-dark); + --in-content-primary-button-background-active: var(--tor-button-background-color-active-dark); + } } ===================================== browser/components/abouttor/content/aboutTor.html ===================================== @@ -22,6 +22,10 @@ <link rel="localization" href="browser/newtab/newtab.ftl" /> <link rel="localization" href="toolkit/global/tor-browser.ftl" /> + <script + type="module" + src="chrome://global/content/elements/moz-button.mjs" + ></script> <script type="module" src="chrome://global/content/elements/moz-toggle.mjs" @@ -44,7 +48,7 @@ data-l10n-id="tor-browser-home-heading-testing" ></span> </h1> - <p id="tor-check"> + <p id="tor-check" class="tor-home-box"> <img id="tor-check-icon" alt="" @@ -132,5 +136,26 @@ ></a> </span> </p> + <!-- Survey element, initially used for tor-browser#43504. --> + <article id="survey" class="tor-home-box" aria-labelledby="survey-heading"> + <img + id="survey-icon" + alt="" + src="chrome://browser/content/abouttor/1f44b-waving-hand.svg" + /> + <h2 id="survey-heading"></h2> + <p id="survey-body"></p> + <div id="survey-buttons"> + <button id="survey-launch" class="primary"></button> + <button id="survey-dismiss"></button> + </div> + <moz-button + id="survey-close" + type="icon ghost" + class="close" + size="16" + iconSrc="chrome://global/skin/icons/close.svg" + ></moz-button> + </article> </body> </html> ===================================== browser/components/abouttor/content/aboutTor.js ===================================== @@ -167,14 +167,241 @@ const MessageArea = { }, }; +/** + * A reusable area for surveys. + * + * Initially used for tor-browser#43504. + */ +const SurveyArea = { + /** + * The current version of the survey. + * + * Should be increased every time we start a new survey campaign. + * + * @type {integer} + */ + _version: 1, + + /** + * The date to start showing the survey. + * + * @type {integer} + */ + _startDate: Date.UTC(2025, 3, 14, 12), // 2025 April 14th, 12:00. + + /** + * The date to stop showing the current survey. + * + * @type {integer} + */ + _endDate: Date.UTC(2025, 3, 28), // 2025 April 28th, 00:00. + + /** + * The survey URL. + * + * @type {string} + */ + _urlBase: "https://survey.torproject.org/index.php/923269", + + /** + * @typedef {object} SurveyLocaleData + * + * Locale-specific data for the survey. + * + * @property {string[]} browserLocales - The browser locales this should match + * with. The first locale should match the locale of the strings. + * @property {string} urlCode - The language code to pass to the survey URL. + * @property {string} dir - The direction of the locale. + * @property {object} strings - The strings to use for the survey banner. + */ + + /** + * The data for the selected locale. + * + * @type {SurveyLocaleData} + */ + _localeData: null, + + /** + * The data for each locale that is supported. + * + * The first entry is the default. + * + * @type {SurveyLocaleData[]} + */ + _localeDataSet: [ + { + browserLocales: ["en-US"], + dir: "ltr", + urlCode: "en", + strings: { + heading: "We’d love your feedback", + body: "Help us improve Tor Browser by completing this 10-minute survey.", + launch: "Launch the survey", + dismiss: "Not now", + close: "Close", + }, + }, + { + browserLocales: ["es-ES"], + dir: "ltr", + urlCode: "es", + strings: { + heading: "Danos tu opinión", + body: "Ayúdanos a mejorar el Navegador Tor completando esta encuesta de 10 minutos.", + launch: "Iniciar la encuesta", + dismiss: "Más adelante", + close: "Cerrar", + }, + }, + { + browserLocales: ["ru"], + dir: "ltr", + urlCode: "ru", + strings: { + heading: "Мы будем рады вашим отзывам", + body: "Помогите нам улучшить браузер Tor, пройдя 10-минутный опрос.", + launch: "Начать опрос", + dismiss: "Не сейчас", + close: "Закрыть", + }, + }, + { + browserLocales: ["fr"], + dir: "ltr", + urlCode: "fr", + strings: { + heading: "Nous serions ravis d’avoir votre avis !", + body: "Aidez-nous à améliorer le navigateur Tor en répondant à cette enquête de 10 minutes.", + launch: "Lancer l'enquête", + dismiss: "Pas maintenant", + close: "Fermer", + }, + }, + { + // Also show this pt-BR banner for the pt-PT browser locale. + browserLocales: ["pt-BR", "pt-PT"], + dir: "ltr", + urlCode: "pt-BR", + strings: { + heading: "Adoraríamos ouvir sua opinião", + body: "Ajude-nos a melhorar o Navegador Tor respondendo a esta pesquisa de 10 minutos.", + launch: "Iniciar a pesquisa", + dismiss: "Mais tarde", + close: "Fechar", + }, + }, + ], + + /** + * Initialize the survey area. + */ + init() { + document.getElementById("survey-launch").addEventListener("click", () => { + if (!this._localeData) { + return; + } + const url = new URL(this._urlBase); + url.searchParams.append("lang", this._localeData.urlCode); + open(url.href); + }); + document.getElementById("survey-close").addEventListener("click", () => { + this._hide(); + }); + document.getElementById("survey-dismiss").addEventListener("click", () => { + this._hide(); + }); + }, + + /** + * Permanently hide this survey. + */ + _hide() { + document.body.classList.remove("show-survey"); + // Move focus to the search input. + document.getElementById("search-input").focus(); + + dispatchEvent( + new CustomEvent("SurveyDismissed", { + // We pass in the current survey version to record the *latest* + // version that the user has dismissed. This will overwrite any + // previous versions. + detail: this._version, + bubbles: true, + }) + ); + }, + + /** + * Decide whether to show the survey. + * + * @param {integer} dismissVersion - The latest version of survey that the + * user has already dismissed. + * @param {boolean} isStable - Whether this is the stable release of Tor + * Browser. + */ + potentiallyShow(dismissVersion, isStable) { + const now = Date.now(); + if ( + now < this._startDate || + now >= this._endDate || + // The user has already dismissed this version of the survey before: + dismissVersion >= this._version || + !isStable + ) { + // Don't show the survey. + return; + } + + // Determine the survey locale based on the about:tor locale. + // NOTE: We do not user document.l10n to translate the survey banner. + // Instead we only translate the banner into a limited set of locales that + // match the languages that the survey itself supports. This should match + // the language of the survey when it is opened by the user. + const pageLocale = document.documentElement.getAttribute("lang"); + for (const localeData of this._localeDataSet) { + if (localeData.browserLocales.includes(pageLocale)) { + this._localeData = localeData; + break; + } + } + if (!this._localeData) { + // Show the default en-US banner. + this._localeData = this._localeDataSet[0]; + } + + // Make sure the survey's lang and dir attributes match the chosen locale. + const surveyEl = document.getElementById("survey"); + surveyEl.setAttribute("lang", this._localeData.browserLocales[0]); + surveyEl.setAttribute("dir", this._localeData.dir); + + const { heading, body, launch, dismiss, close } = this._localeData.strings; + + document.getElementById("survey-heading").textContent = heading; + document.getElementById("survey-body").textContent = body; + document.getElementById("survey-launch").textContent = launch; + document.getElementById("survey-dismiss").textContent = dismiss; + document.getElementById("survey-close").setAttribute("title", close); + + document.body.classList.add("show-survey"); + }, +}; + window.addEventListener("DOMContentLoaded", () => { SearchWidget.init(); MessageArea.init(); + SurveyArea.init(); }); window.addEventListener("InitialData", event => { - const { torConnectEnabled, isStable, searchOnionize, messageData } = - event.detail; + const { + torConnectEnabled, + isStable, + searchOnionize, + messageData, + surveyDismissVersion, + } = event.detail; SearchWidget.setOnionizeState(!!searchOnionize); MessageArea.setMessageData(messageData, !!isStable, !!torConnectEnabled); + SurveyArea.potentiallyShow(surveyDismissVersion, isStable); }); ===================================== browser/components/abouttor/jar.mn ===================================== @@ -3,6 +3,7 @@ browser.jar: content/browser/abouttor/aboutTor.js (content/aboutTor.js) content/browser/abouttor/aboutTor.html (content/aboutTor.html) content/browser/abouttor/dax-logo.svg (content/dax-logo.svg) + content/browser/abouttor/1f44b-waving-hand.svg (content/1f44b-waving-hand.svg) content/browser/abouttor/1f4e3-megaphone.svg (content/1f4e3-megaphone.svg) content/browser/abouttor/26a1-high-voltage.svg (content/26a1-high-voltage.svg) content/browser/abouttor/2728-sparkles.svg (content/2728-sparkles.svg) View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/dce8efc… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/dce8efc… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.8.0esr-14.5-1] fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in...
by henry (@henry) 10 Mar '25

10 Mar '25
henry pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 4b55145d by Henry Wilkes at 2025-03-10T11:17:32+00:00 fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection TB 43547: Removing the last bridge sets the source to Invalid instead. - - - - - 1 changed file: - browser/components/torpreferences/content/connectionPane.js Changes: ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -739,9 +739,16 @@ const gBridgeGrid = { } strings.splice(index, 1); - TorSettings.changeSettings({ - bridges: { source, bridge_strings: strings }, - }); + if (strings.length) { + TorSettings.changeSettings({ + bridges: { source, bridge_strings: strings }, + }); + } else { + // Remove all bridges and disable. + TorSettings.changeSettings({ + bridges: { source: TorBridgeSource.Invalid }, + }); + } }); }, View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4b55145… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4b55145… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.8.0esr-14.5-1] 3 commits: fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in...
by henry (@henry) 10 Mar '25

10 Mar '25
henry pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 03900c02 by Henry Wilkes at 2025-03-10T11:05:42+00:00 fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection TB 43463: Use TorConnect.frequentRegionCodes promise to populate the locations popup. Also ensure the initial value is "automatic". - - - - - 8e2dc3e0 by Henry Wilkes at 2025-03-10T11:05:44+00:00 fixup! TB 27476: Implement about:torconnect captive portal within Tor Browser TB 43463: Renamed TorConnect getCountryCodes to getFrequentRegions. - - - - - 48d3af20 by Henry Wilkes at 2025-03-10T11:05:45+00:00 fixup! TB 40597: Implement TorSettings module TB 43463: Load Moat regions from a local file rather than using Moat. Also rename getCountryCodes to getFrequentRegions. - - - - - 10 changed files: - .eslintignore - .prettierignore - browser/components/torpreferences/content/connectionPane.js - toolkit/components/torconnect/TorConnectParent.sys.mjs - toolkit/components/torconnect/content/aboutTorConnect.js - toolkit/content/jar.mn - + toolkit/content/moat_countries_dev_build.json - toolkit/modules/Moat.sys.mjs - toolkit/modules/RemotePageAccessManager.sys.mjs - toolkit/modules/TorConnect.sys.mjs Changes: ===================================== .eslintignore ===================================== @@ -304,4 +304,5 @@ browser/app/profile/001-base-profile.js browser/app/profile/000-tor-browser.js mobile/android/app/000-tor-browser-android.js toolkit/content/pt_config.json +toolkit/content/moat_contries_dev_build.json toolkit/components/lox/lox_wasm.jsm ===================================== .prettierignore ===================================== @@ -1533,4 +1533,5 @@ browser/app/profile/001-base-profile.js browser/app/profile/000-tor-browser.js mobile/android/app/000-tor-browser-android.js toolkit/content/pt_config.json +toolkit/content/moat_countries_dev_build.json toolkit/components/lox/lox_wasm.jsm ===================================== browser/components/torpreferences/content/connectionPane.js ===================================== @@ -2529,65 +2529,48 @@ const gConnectionPane = (function () { regionCode: location.value, }); }); - this._populateLocations = () => { - const currentValue = location.value; - locationEntries.textContent = ""; - const createItem = (value, label, disabled) => { - const item = document.createXULElement("menuitem"); - item.setAttribute("value", value); - item.setAttribute("label", label); - if (disabled) { - item.setAttribute("disabled", "true"); - } - return item; - }; - const addLocations = codes => { - const items = []; - for (const code of codes) { - items.push( - createItem( - code, - TorConnect.countryNames[code] - ? TorConnect.countryNames[code] - : code - ) - ); - } - items.sort((left, right) => left.label.localeCompare(right.label)); - locationEntries.append(...items); - }; - locationEntries.append( - createItem("automatic", TorStrings.settings.bridgeLocationAutomatic) - ); - if (TorConnect.countryCodes.length) { - locationEntries.append( - createItem("", TorStrings.settings.bridgeLocationFrequent, true) - ); - addLocations(TorConnect.countryCodes); - locationEntries.append( - createItem("", TorStrings.settings.bridgeLocationOther, true) + const createItem = (value, label, disabled) => { + const item = document.createXULElement("menuitem"); + item.setAttribute("value", value); + item.setAttribute("label", label); + if (disabled) { + item.setAttribute("disabled", "true"); + } + return item; + }; + const addLocations = codes => { + const items = []; + for (const code of codes) { + items.push( + createItem( + code, + TorConnect.countryNames[code] + ? TorConnect.countryNames[code] + : code + ) ); } - addLocations(Object.keys(TorConnect.countryNames)); - location.value = currentValue; + items.sort((left, right) => left.label.localeCompare(right.label)); + locationEntries.append(...items); }; + // Add automatic before waiting for getFrequentRegions. + locationEntries.append( + createItem("automatic", TorStrings.settings.bridgeLocationAutomatic) + ); + location.value = "automatic"; + TorConnect.getFrequentRegions().then(frequentCodes => { + locationEntries.append( + createItem("", TorStrings.settings.bridgeLocationFrequent, true) + ); + addLocations(frequentCodes); + locationEntries.append( + createItem("", TorStrings.settings.bridgeLocationOther, true) + ); + addLocations(Object.keys(TorConnect.countryNames)); + }); this._showAutoconfiguration = () => { - if ( - !TorConnect.canBeginAutoBootstrap || - !TorConnect.potentiallyBlocked - ) { - locationGroup.setAttribute("hidden", "true"); - return; - } - // Populate locations, even though we will show only the automatic - // item for a moment. In my opinion showing the button immediately is - // better then waiting for the Moat query to finish (after a while) - // and showing the controls only after that. - this._populateLocations(); - locationGroup.removeAttribute("hidden"); - if (!TorConnect.countryCodes.length) { - TorConnect.getCountryCodes().then(() => this._populateLocations()); - } + locationGroup.hidden = + !TorConnect.canBeginAutoBootstrap || !TorConnect.potentiallyBlocked; }; this._showAutoconfiguration(); } ===================================== toolkit/components/torconnect/TorConnectParent.sys.mjs ===================================== @@ -132,8 +132,8 @@ export class TorConnectParent extends JSWindowActorParent { stage: TorConnect.stage, quickstartEnabled: TorConnect.quickstart, }; - case "torconnect:get-country-codes": - return TorConnect.getCountryCodes(); + case "torconnect:get-frequent-regions": + return TorConnect.getFrequentRegions(); } return undefined; } ===================================== toolkit/components/torconnect/content/aboutTorConnect.js ===================================== @@ -610,7 +610,7 @@ class AboutTorConnect { showLocationForm(isChoose, buttonLabel) { this.hideButtons(); - RPMSendQuery("torconnect:get-country-codes").then(codes => { + RPMSendQuery("torconnect:get-frequent-regions").then(codes => { if (codes && codes.length) { this.populateFrequentLocations(codes); this.setLocation(); ===================================== toolkit/content/jar.mn ===================================== @@ -158,4 +158,9 @@ toolkit.jar: content/global/third_party/d3/d3.js (/third_party/js/d3/d3.js) content/global/third_party/cfworker/json-schema.js (/third_party/js/cfworker/json-schema.js) + # The pt_config.json content should be replaced in the omni.ja in + # tor-browser-build. See tor-browser#42343. content/global/pt_config.json (pt_config.json) + # The moat_countries.json content should be replaced in the omni.ja in + # tor-browser-build. See tor-browser#43463. + content/global/moat_countries.json (moat_countries_dev_build.json) ===================================== toolkit/content/moat_countries_dev_build.json ===================================== @@ -0,0 +1,7 @@ +[ + { + "_comment1": "Used for dev build, replaced for release builds in tor-browser-build.", + "_comment2": "List is taken from tpo/anti-censorship/rdsys-admin 810fb24b:conf/circumvention.json and filtered with `jq -c keys`." + }, + "by","cn","eg","hk","ir","mm","ru","tm" +] ===================================== toolkit/modules/Moat.sys.mjs ===================================== @@ -335,20 +335,6 @@ export class MoatRPC { return settings; } - // Request a list of country codes with available censorship circumvention - // settings. - // - // returns an array of ISO 3166-1 alpha-2 country codes which we can query - // settings for. - async circumvention_countries() { - const args = {}; - const { response } = await this.#makeRequest( - "circumvention/countries", - args - ); - return response; - } - // Request a copy of the builtin bridges, takes the following parameters: // - transports: optional, an array of transports we would like the latest // bridge strings for; if empty (or not given) returns all of them ===================================== toolkit/modules/RemotePageAccessManager.sys.mjs ===================================== @@ -255,7 +255,7 @@ export let RemotePageAccessManager = { ], RPMSendQuery: [ "torconnect:get-init-args", - "torconnect:get-country-codes", + "torconnect:get-frequent-regions", ], }, "about:welcome": { ===================================== toolkit/modules/TorConnect.sys.mjs ===================================== @@ -817,8 +817,14 @@ export const TorConnect = { }; }, - // list of country codes Moat has settings for - _countryCodes: [], + /** + * Promise that resolves to a list of region codes that Moat has special + * bridge settings for. + * + * @type {Promise<string[]>} + */ + _moatRegionsPromise: null, + _countryNames: Object.freeze( (() => { const codes = Services.intl.getAvailableLocaleDisplayNames("region"); @@ -892,6 +898,18 @@ export const TorConnect = { return; } + this._moatRegionsPromise = fetch( + "chrome://global/content/moat_countries.json" + ) + .then(req => req.json()) + // Filter out the "_comment" object in the moat_countries_dev_build.json + // file. + .then(regionList => regionList.filter(r => typeof r === "string")) + .catch(e => { + lazy.logger.error("Failed to fetch Moat region codes", e); + return []; + }); + let observeTopic = addTopic => { Services.obs.addObserver(this, addTopic); lazy.logger.debug(`Observing topic '${addTopic}'`); @@ -1113,10 +1131,6 @@ export const TorConnect = { return null; }, - get countryCodes() { - return this._countryCodes; - }, - get countryNames() { return this._countryNames; }, @@ -1526,25 +1540,12 @@ export const TorConnect = { this._makeStageRequest(TorConnectStage.ChooseRegion); }, - /* - Further external commands and helper methods + /** + * Get the list of regions that Moat has settings for. + * + * @returns {string[]} - The list of region codes. */ - - async getCountryCodes() { - // Difference with the getter: this is to be called by TorConnectParent, and - // downloads the country codes if they are not already in cache. - if (this._countryCodes.length) { - return this._countryCodes; - } - const mrpc = new lazy.MoatRPC(); - try { - await mrpc.init(); - this._countryCodes = await mrpc.circumvention_countries(); - } catch (err) { - lazy.logger.error("An error occurred while fetching country codes", err); - } finally { - mrpc.uninit(); - } - return this._countryCodes; + async getFrequentRegions() { + return this._moatRegionsPromise ?? []; }, }; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8bb1b9… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/8bb1b9… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.8.0esr-14.5-1] 2 commits: fixup! TB 40041 [android]: Implement Tor Network Settings
by Dan Ballard (@dan) 07 Mar '25

07 Mar '25
Dan Ballard pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 496a888f by clairehurst at 2025-03-07T04:03:11+00:00 fixup! TB 40041 [android]: Implement Tor Network Settings tor-browser#43329 [Android] Remove remaining traces of the old Bootstrap - - - - - 8bb1b960 by clairehurst at 2025-03-07T04:03:11+00:00 fixup! TB 41878: [android] Add standalone Tor Bootstrap tor-browser#43329 [Android] Remove remaining traces of the old Bootstrap # Conflicts: # mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt - - - - - 3 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt - − mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapStatus.kt - mobile/android/fenix/app/src/main/res/navigation/nav_graph.xml Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt ===================================== @@ -158,8 +158,6 @@ import org.mozilla.fenix.search.toolbar.SearchSelectorMenu import org.mozilla.fenix.tabstray.Page import org.mozilla.fenix.tabstray.TabsTrayAccessPoint import org.mozilla.fenix.theme.FirefoxTheme -import org.mozilla.fenix.tor.TorBootstrapFragmentDirections -import org.mozilla.fenix.tor.TorBootstrapStatus import org.mozilla.fenix.tor.TorConnectionAssistViewModel import org.mozilla.fenix.utils.Settings.Companion.TOP_SITES_PROVIDER_MAX_THRESHOLD import org.mozilla.fenix.utils.allowUndo @@ -262,7 +260,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { private val bottomToolbarContainerIntegration = ViewBoundFeatureWrapper<BottomToolbarContainerIntegration>() private lateinit var savedLoginsLauncher: ActivityResultLauncher<Intent> - private lateinit var torBootstrapStatus: TorBootstrapStatus override fun onCreate(savedInstanceState: Bundle?) { // DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL! @@ -295,12 +292,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { val activity = activity as HomeActivity val components = requireComponents - torBootstrapStatus = TorBootstrapStatus( - !BuildConfig.DISABLE_TOR, - components.torController, - ::dispatchModeChanges - ) - val currentWallpaperName = requireContext().settings().currentWallpaperName applyWallpaper( wallpaperName = currentWallpaperName, @@ -1037,7 +1028,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { override fun onStop() { dismissRecommendPrivateBrowsingShortcut() super.onStop() - torBootstrapStatus.unregisterTorListener() } override fun onStart() { @@ -1090,15 +1080,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { } } - private fun dispatchModeChanges(isBootstrapping: Boolean) { - if (isBootstrapping) { - val directions = - TorBootstrapFragmentDirections - .actionStartupTorbootstrap() - findNavController().navigate(directions) - } - } - @VisibleForTesting internal fun removeCollectionWithUndo(tabCollection: TabCollection) { val snackbarMessage = getString(R.string.snackbar_collection_deleted) @@ -1122,7 +1103,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { override fun onResume() { super.onResume() - torBootstrapStatus.registerTorListener() if (browsingModeManager.mode == BrowsingMode.Private) { activity?.window?.setBackgroundDrawableResource(R.drawable.private_home_background_gradient) } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/tor/TorBootstrapStatus.kt deleted ===================================== @@ -1,45 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.tor - -@SuppressWarnings("LongParameterList", "TooManyFunctions") -class TorBootstrapStatus( - private val shouldStartTor: Boolean, - private val torController: TorController, - private val dispatchModeChanges: (isShouldBootstrap: Boolean) -> Unit - ) : TorEvents { - - init { - torController.registerTorListener(this) - } - - fun isBootstrapping() = (shouldStartTor && !torController.isBootstrapped) - - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorConnecting() { - } - - override fun onTorConnected() { - dispatchModeChanges(isBootstrapping()) - } - - override fun onTorStopped() { - dispatchModeChanges(isBootstrapping()) - } - - @SuppressWarnings("EmptyFunctionBlock") - override fun onTorStatusUpdate(entry: String?, status: String?, progress: Double?) { - } - - fun unregisterTorListener() { - torController.unregisterTorListener(this) - } - - fun registerTorListener() { - torController.registerTorListener(this) - } - -} ===================================== mobile/android/fenix/app/src/main/res/navigation/nav_graph.xml ===================================== @@ -15,12 +15,6 @@ app:popUpTo="@id/startupFragment" app:popUpToInclusive="true" /> - <action - android:id="@+id/action_startup_torbootstrap" - app:destination="@id/torbootstrapFragment" - app:popUpTo="@id/startupFragment" - app:popUpToInclusive="true" /> - <action android:id="@+id/action_startup_tor_connection_assist" app:destination="@+id/torConnectionAssistFragment" @@ -248,25 +242,6 @@ app:popExitAnim="@anim/slide_out_right" /> </fragment> - <fragment - android:id="@+id/torbootstrapFragment" - android:name="org.mozilla.fenix.tor.TorBootstrapFragment" - tools:layout="@layout/fragment_home"> - - <action - android:id="@+id/action_home" - app:destination="@id/homeFragment" - app:popUpTo="@id/torbootstrapFragment" - app:popUpToInclusive="true" /> - <action - android:id="@+id/action_torbootstrapFragment_to_SettingsFragment" - app:destination="@id/settingsFragment" - app:enterAnim="@anim/slide_in_right" - app:exitAnim="@anim/slide_out_left" - app:popEnterAnim="@anim/slide_in_left" - app:popExitAnim="@anim/slide_out_right" /> - </fragment> - <fragment android:id="@+id/torConnectionAssistFragment" android:name="org.mozilla.fenix.tor.TorConnectionAssistFragment" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/e68b04… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/e68b04… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41387: Fix Lyrebird for Android with Go 1.23.
by Pier Angelo Vendrame (@pierov) 06 Mar '25

06 Mar '25
Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: 34b8f1ae by Pier Angelo Vendrame at 2025-03-06T16:52:55+01:00 Bug 41387: Fix Lyrebird for Android with Go 1.23. - - - - - 1 changed file: - projects/lyrebird/build Changes: ===================================== projects/lyrebird/build ===================================== @@ -17,7 +17,7 @@ cd /var/tmp/build/[% project %]-[% c('version') %] tar -xf $rootdir/[% c('input_files_by_name/go_vendor') %] -go build -mod=vendor -ldflags '-s' ./cmd/lyrebird +go build -mod=vendor -ldflags '-s[% IF c("var/android") %] -checklinkname=0[% END %]' ./cmd/lyrebird cp -a lyrebird[% IF c("var/windows") %].exe[% END %] $distdir cd $distdir View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-13.5] Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers
by morgan (@morgan) 06 Mar '25

06 Mar '25
morgan pushed to branch maint-13.5 at The Tor Project / Applications / tor-browser-build Commits: e2aea614 by Morgan at 2025-03-06T11:29:19+00:00 Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers - - - - - 3 changed files: - + keyring/clairehurst.gpg - projects/firefox/config - projects/geckoview/config Changes: ===================================== keyring/clairehurst.gpg ===================================== Binary files /dev/null and b/keyring/clairehurst.gpg differ ===================================== projects/firefox/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg ===================================== projects/geckoview/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-14.0] Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers
by morgan (@morgan) 06 Mar '25

06 Mar '25
morgan pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build Commits: 08b0f096 by Morgan at 2025-03-06T11:28:47+00:00 Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers - - - - - 3 changed files: - + keyring/clairehurst.gpg - projects/firefox/config - projects/geckoview/config Changes: ===================================== keyring/clairehurst.gpg ===================================== Binary files /dev/null and b/keyring/clairehurst.gpg differ ===================================== projects/firefox/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg ===================================== projects/geckoview/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][main] Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers
by morgan (@morgan) 06 Mar '25

06 Mar '25
morgan pushed to branch main at The Tor Project / Applications / tor-browser-build Commits: d4b60fd3 by Morgan at 2025-03-06T11:20:46+00:00 Bug 41383: Add clairehurst to list of accepted firefox/geckoview signers - - - - - 3 changed files: - + keyring/clairehurst.gpg - projects/firefox/config - projects/geckoview/config Changes: ===================================== keyring/clairehurst.gpg ===================================== Binary files /dev/null and b/keyring/clairehurst.gpg differ ===================================== projects/firefox/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg ===================================== projects/geckoview/config ===================================== @@ -6,6 +6,7 @@ tag_gpg_id: 1 git_url: https://gitlab.torproject.org/tpo/applications/tor-browser.git gpg_keyring: - boklm.gpg + - clairehurst.gpg - dan_b.gpg - ma1.gpg - morgan.gpg View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-128.8.0esr-14.5-1] 3 commits: Bug 1917556 - [marionette] Fix Mn tests with Python 3.12 r=webdriver-reviewers,whimboo
by Pier Angelo Vendrame (@pierov) 06 Mar '25

06 Mar '25
Pier Angelo Vendrame pushed to branch base-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 9492cb87 by Julian Descottes at 2025-03-06T10:46:29+01:00 Bug 1917556 - [marionette] Fix Mn tests with Python 3.12 r=webdriver-reviewers,whimboo Differential Revision: https://phabricator.services.mozilla.com/D221448 - - - - - 29861015 by Beatriz Rizental at 2025-03-06T10:47:06+01:00 fixup! Base Browser's .mozconfigs. - - - - - 63d64ecc by Beatriz Rizental at 2025-03-06T10:47:15+01:00 BB 43535: Enable tests - - - - - 5 changed files: - mozconfig-linux-aarch64-dev - mozconfig-linux-x86_64-dev - mozconfig-macos-dev - testing/marionette/harness/marionette_harness/runner/base.py - testing/specialpowers/api.js Changes: ===================================== mozconfig-linux-aarch64-dev ===================================== @@ -16,3 +16,5 @@ ac_add_options --disable-install-strip ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +ac_add_options --enable-tests ===================================== mozconfig-linux-x86_64-dev ===================================== @@ -19,3 +19,5 @@ ac_add_options --disable-base-browser-update # Let's make sure no preference is enabling either Adobe's or Google's CDM. ac_add_options --disable-eme + +ac_add_options --enable-tests ===================================== mozconfig-macos-dev ===================================== @@ -19,3 +19,5 @@ ac_add_options --disable-update-agent # Let's make sure no preference is enabling either Adobe's or Google's CDM. ac_add_options --disable-eme + +ac_add_options --enable-tests ===================================== testing/marionette/harness/marionette_harness/runner/base.py ===================================== @@ -222,7 +222,7 @@ class MarionetteTestResult(StructuredTestResult, TestResultCollection): self.logger.info("END LOG:") def stopTest(self, *args, **kwargs): - unittest._TextTestResult.stopTest(self, *args, **kwargs) + unittest.TextTestResult.stopTest(self, *args, **kwargs) if self.marionette.check_for_crash(): # this tells unittest.TestSuite not to continue running tests self.shouldStop = True ===================================== testing/specialpowers/api.js ===================================== @@ -40,6 +40,18 @@ this.specialpowers = class extends ExtensionAPI { uri, resProto.ALLOW_CONTENT_ACCESS ); + } else { + // This is a hack! + // For some reason, this specific substituion has an extra `/` in the path. + // This is a workaround to fix it. + // + // TODO (#43545): Remove this once we have a proper fix. + let uri = resProto.getSubstitution("testing-common"); + resProto.setSubstitution( + "testing-common", + Services.io.newURI(uri.spec.replace("file:////", "file:///")), + resProto.ALLOW_CONTENT_ACCESS + ); } SpecialPowersParent.registerActor(); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/cb0e95… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/cb0e95… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.8.0esr-14.5-1] 4 commits: Bug 1917556 - [marionette] Fix Mn tests with Python 3.12 r=webdriver-reviewers,whimboo
by Pier Angelo Vendrame (@pierov) 06 Mar '25

06 Mar '25
Pier Angelo Vendrame pushed to branch tor-browser-128.8.0esr-14.5-1 at The Tor Project / Applications / Tor Browser Commits: 3d30c6e9 by Julian Descottes at 2025-03-06T10:30:48+01:00 Bug 1917556 - [marionette] Fix Mn tests with Python 3.12 r=webdriver-reviewers,whimboo Differential Revision: https://phabricator.services.mozilla.com/D221448 - - - - - a21c94fd by Beatriz Rizental at 2025-03-06T10:30:48+01:00 fixup! Base Browser's .mozconfigs. - - - - - d5d98c87 by Beatriz Rizental at 2025-03-06T10:30:48+01:00 fixup! TB 41089: Add tor-browser build scripts + Makefile to tor-browser - - - - - e68b047e by Beatriz Rizental at 2025-03-06T10:30:49+01:00 BB 43535: Enable tests - - - - - 7 changed files: - mozconfig-linux-aarch64-dev - mozconfig-linux-x86_64-dev - mozconfig-macos-dev - testing/marionette/harness/marionette_harness/runner/base.py - testing/specialpowers/api.js - tools/torbrowser/Makefile - + tools/torbrowser/prepare-tests.sh Changes: ===================================== mozconfig-linux-aarch64-dev ===================================== @@ -18,3 +18,5 @@ ac_add_options --disable-install-strip ac_add_options --with-base-browser-version=dev-build ac_add_options --disable-base-browser-update + +ac_add_options --enable-tests ===================================== mozconfig-linux-x86_64-dev ===================================== @@ -21,3 +21,5 @@ ac_add_options --disable-base-browser-update # Let's make sure no preference is enabling either Adobe's or Google's CDM. ac_add_options --disable-eme + +ac_add_options --enable-tests ===================================== mozconfig-macos-dev ===================================== @@ -25,3 +25,5 @@ ac_add_options --with-relative-data-dir=../TorBrowser-Data/Browser #copied from the diff between mozconfig-linux-x86_64 and mozconfig-linux-x86_64-dev export MOZ_APP_REMOTINGNAME="Tor Browser Dev" ac_add_options --with-branding=browser/branding/tb-nightly + +ac_add_options --enable-tests ===================================== testing/marionette/harness/marionette_harness/runner/base.py ===================================== @@ -222,7 +222,7 @@ class MarionetteTestResult(StructuredTestResult, TestResultCollection): self.logger.info("END LOG:") def stopTest(self, *args, **kwargs): - unittest._TextTestResult.stopTest(self, *args, **kwargs) + unittest.TextTestResult.stopTest(self, *args, **kwargs) if self.marionette.check_for_crash(): # this tells unittest.TestSuite not to continue running tests self.shouldStop = True ===================================== testing/specialpowers/api.js ===================================== @@ -40,6 +40,18 @@ this.specialpowers = class extends ExtensionAPI { uri, resProto.ALLOW_CONTENT_ACCESS ); + } else { + // This is a hack! + // For some reason, this specific substituion has an extra `/` in the path. + // This is a workaround to fix it. + // + // TODO (#43545): Remove this once we have a proper fix. + let uri = resProto.getSubstitution("testing-common"); + resProto.setSubstitution( + "testing-common", + Services.io.newURI(uri.spec.replace("file:////", "file:///")), + resProto.ALLOW_CONTENT_ACCESS + ); } SpecialPowersParent.registerActor(); ===================================== tools/torbrowser/Makefile ===================================== @@ -53,6 +53,9 @@ build: deploy: ./deploy.sh $(BINARIES) $(BUILD_OUTPUT) +prepare-tests: + ./prepare-tests.sh $(BINARIES) $(BUILD_OUTPUT) + all: build deploy run: ===================================== tools/torbrowser/prepare-tests.sh ===================================== @@ -0,0 +1,25 @@ +#!/bin/sh +set -e + +BINARIES="$1" +BUILD_OUTPUT="$2" + +if [ ! -d "$BUILD_OUTPUT" ]; then + echo "Error: $BUILD_OUTPUT directory does not exist." + echo "Make sure to run `mach ./build` or `make -C tools/torbrowser build`." + exit 1 +fi + +if [ ! -d "$BINARIES" ]; then + echo "Error: $BINARIES directory does not exist." + echo "Make sure to run `make -C tools/torbrowser fetch`." + exit 1 +fi + +if [ "$(uname)" = "Darwin" ]; then + cp -r "$BINARIES/Tor Browser.app/Contents/MacOS/Tor" "$BUILD_OUTPUT/dist/firefox/"*.app/Contents/MacOS + cp -r "$BINARIES/Tor Browser.app/Contents/Resources/fonts" "$BUILD_OUTPUT/dist/firefox/"*.app/Contents/Resources +else + cp -r "$BINARIES/dev/Browser/fonts" "$BUILD_OUTPUT/dist/bin" + cp -r "$BINARIES/dev/Browser/TorBrowser" "$BUILD_OUTPUT/dist/bin" +fi View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/347af8… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/347af8… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.