Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge branch 'main' into 12565
Browse files Browse the repository at this point in the history
  • Loading branch information
iorgamgabriel committed Aug 8, 2022
2 parents a375455 + dc028b5 commit c8974d1
Show file tree
Hide file tree
Showing 88 changed files with 783 additions and 103 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ subprojects {
}

jacoco {
toolVersion = "0.8.7"
toolVersion = "0.8.8"
}

// Format test output
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ object Versions {
const val disklrucache = "2.0.2"
const val leakcanary = "2.8.1"

const val mozilla_appservices = "93.7.1"
const val mozilla_appservices = "93.8.0"

const val mozilla_glean = "50.1.3"
const val mozilla_glean = "51.0.1"

const val material = "1.2.1"

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Gecko.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Gecko {
/**
* GeckoView Version.
*/
const val version = "105.0.20220801034014"
const val version = "105.0.20220808092108"

/**
* GeckoView channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ import org.mozilla.geckoview.GeckoSession.PromptDelegate.PromptInstanceDelegate
* with the onPromptUpdate callback.
* @param previousPrompt [PromptRequest] to be updated.
*/
internal class ChoicePromptUpdateDelegate(
internal class ChoicePromptDelegate(
private val geckoSession: GeckoEngineSession,
private var previousPrompt: PromptRequest,
) : PromptInstanceDelegate {

override fun onPromptDismiss(prompt: BasePrompt) {
geckoSession.notifyObservers {
onPromptDismissed(previousPrompt)
}
}

override fun onPromptUpdate(prompt: BasePrompt) {
if (prompt is ChoicePrompt) {
val promptRequest = updatePromptChoices(prompt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ internal class GeckoPromptDelegate(private val geckoEngineSession: GeckoEngineSe
else -> throw InvalidParameterException("${geckoPrompt.type} is not a valid Gecko @Choice.ChoiceType")
}

geckoPrompt.delegate = ChoicePromptUpdateDelegate(
geckoPrompt.delegate = ChoicePromptDelegate(
geckoEngineSession,
promptRequest
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.junit.runner.RunWith
import org.mozilla.geckoview.GeckoSession

@RunWith(AndroidJUnit4::class)
class ChoicePromptUpdateDelegateTest {
class ChoicePromptDelegateTest {

@Test
fun `WHEN onPromptUpdate is called from GeckoView THEN notifyObservers is invoked with onPromptUpdate`() {
Expand All @@ -41,7 +41,7 @@ class ChoicePromptUpdateDelegateTest {
{ isOnConfirmCalled = true },
{ isOnDismissCalled = true }
)
val delegate = ChoicePromptUpdateDelegate(mockSession, prompt)
val delegate = ChoicePromptDelegate(mockSession, prompt)
val updatedPrompt = mock<GeckoSession.PromptDelegate.ChoicePrompt>()
ReflectionUtils.setField(updatedPrompt, "choices", arrayOf<GeckoChoice>())

Expand All @@ -55,4 +55,23 @@ class ChoicePromptUpdateDelegateTest {
assertTrue(isOnDismissCalled)
assertTrue(isOnConfirmCalled)
}

@Test
fun `WHEN onPromptDismiss is called from GeckoView THEN notifyObservers is invoked with onPromptDismissed`() {
val mockSession = GeckoEngineSession(mock())
var isOnDismissCalled = false
mockSession.register(object : EngineSession.Observer {
override fun onPromptDismissed(promptRequest: PromptRequest) {
super.onPromptDismissed(promptRequest)
isOnDismissCalled = true
}
})
val basePrompt: GeckoSession.PromptDelegate.ChoicePrompt = mock()
val prompt: PromptRequest = mock()
val delegate = ChoicePromptDelegate(mockSession, prompt)

delegate.onPromptDismiss(basePrompt)

assertTrue(isOnDismissCalled)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<!-- The text shown inside the advanced options button used to bypass the invalid SSL certificate. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_cert_accept_temporary">Aceutar el riesgu y siguir</string>

<!-- The document title and heading of the error page shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_title">Esti sitiu web rique una conexón segura.</string>
<!-- The error message shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_message"><![CDATA[
<ul>
Expand Down Expand Up @@ -250,6 +252,8 @@

<!-- The title of the error page for websites that do not support HTTPS when HTTPS-Only is turned on -->
<string name="mozac_browser_errorpages_httpsonly_title">El sitiu seguru nun ta disponible</string>
<!-- The text of the error page for websites that do not support HTTPS when HTTPS-Only is turned on. %1$s will be replaced with the URL of the website. -->
<string name="mozac_browser_errorpages_httpsonly_message"><![CDATA[Activesti\'l mou de namás HTTPS p\'ameyorar la seguranza, y la versión HTTPS de <em>%1$s</em> nun ta disponible.]]></string>
<!-- Button on error page for websites that do not support HTTPS when HTTPS-Only is turned on. Clicking the button allows the user to nevertheless load the website using HTTP. -->
<string name="mozac_browser_errorpages_httpsonly_button">Siguir col sitiu HTTP</string>
</resources>
26 changes: 22 additions & 4 deletions components/browser/errorpages/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ kdo se snaží vydávat za server.</li>

<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string moz:removedIn="104" name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo" tools:ignore="UnusedResources"><![CDATA[Server <label> <b>%1$s</b> má nastaveno bezpečnostní pravidlo HTTP Strict Transport Security (HSTS), které od aplikace <b>%2$s</b> vyžaduje používání pouze zabezpečeného spojení. Pro připojení k této stránce nelze udělit výjimku.]]></string>
<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo2"><![CDATA[Server <label> <b>%1$s</b> má nastaveno bezpečnostní pravidlo HTTP Strict Transport Security (HSTS), které od aplikace <b>%2$s</b> vyžaduje používání pouze zabezpečeného spojení. Pro připojení k této stránce nelze udělit výjimku.</label>]]></string>
<!-- The text shown inside the advanced options button used to go back. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_back">Zpátky</string>

Expand All @@ -78,6 +80,15 @@ kdo se snaží vydávat za server.</li>
<!-- The document title and heading of the error page shown when a website takes too long to load. -->
<string name="mozac_browser_errorpages_net_timeout_title">Vypršel čas spojení</string>

<!-- The error message shown when a website took long to load. -->
<string name="mozac_browser_errorpages_net_timeout_message"><![CDATA[<p>Požadovaný server neodpověděl na požadavek o připojení a prohlížeč ukončil čekání na tuto odpověď.</p>
<ul>
<li>Server může být velmi vytížen. Opakujte akci později.</li>
<li>Funguje načítání ostatních webových stránek? Zkontrolujte síťové připojení vašeho zařízení.</li>
<li>Připojuje se vaše zařízení k síti skrze firewall nebo proxy server? Nesprávné nastavení může načítání stránek ovlivnit.</li>
<li>Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.</li>
</ul>]]></string>

<!-- The document title and heading of the error page shown when a website could not be reached. -->
<string name="mozac_browser_errorpages_connection_failure_title">Nelze se připojit</string>
<!-- The error message shown when a website could not be reached. -->
Expand Down Expand Up @@ -233,18 +244,25 @@ kdo se snaží vydávat za server.</li>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_proxy_connection_refused_title">Proxy server odmítl spojení</string>
<string name="mozac_browser_errorpages_proxy_connection_refused_message"><![CDATA[
<p>Prohlížeč je nakonfigurován k použití proxy serveru, který odmítl spojení.</p>
<string name="mozac_browser_errorpages_proxy_connection_refused_message"><![CDATA[<p>Prohlížeč je nastaven, aby používal proxy server, který odmítá spojení.</p>
<ul>
<li>Zkontrolujte v prohlížeči nastavení proxy serveru a opakujte akci.</li>
<li>Zkontrolujte v prohlížeči nastavení proxy serveru a akci opakujte.</li>
<li>Je možné, že proxy server nepovoluje připojení z vaší sítě.</li>
<li>Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.</li>
</ul>
]]></string>
]]></string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_unknown_proxy_host_title">Proxy server nenalezen</string>

<string name="mozac_browser_errorpages_unknown_proxy_host_message"><![CDATA[<p>Prohlížeč je nastaven, aby používal proxy server, který nelze nalézt.</p>
<ul>
<li>Zkontrolujte v prohlížeči nastavení proxy serveru a akci opakujte.</li>
<li>Zkontrolujte síťové připojení vašeho zařízení.</li>
<li>Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.</li>
</ul>
]]></string>

<!-- The document title and heading of an error page. -->
<string name="mozac_browser_errorpages_safe_browsing_malware_uri_title">Problém se škodlivým softwarem</string>
<!-- The %1$s will be replaced by the malicious website URL-->
Expand Down
28 changes: 27 additions & 1 deletion components/browser/errorpages/src/main/res/values-gd/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:moz="http://mozac.org/tools">

<!-- The button that appears at the bottom of an error page. -->
<string name="mozac_browser_errorpages_page_refresh">Feuch ris a-rithist</string>
Expand Down Expand Up @@ -36,6 +36,32 @@
<!-- The text shown inside the advanced options button used to bypass the invalid SSL certificate. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_cert_accept_temporary">Tuigidh mi an cunnart, air adhart leam</string>

<!-- The document title and heading of the error page shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_title">Feumaidh an làrach-lìn seo ceangal tèarainte.</string>
<!-- The error message shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_message"><![CDATA[
<ul>
<li>Chan urrainn dhuinn an duilleag seo a shealltainn dhut a chionn ’s gum feum an làrach-lìn seo ceangal tèarainte.</li>
<li>Mar is trice, ’s ann aig an làrach-lìn a bhios an duilgheadas agus chan eil dad ann as urrainn dhut-sa a dhèanamh airson a chur ceart.</li>
<li>Ach is urrainn dhut innse do rianaire na làraich-lìn gu bheil an duilgheadas seo ann.</li>
</ul>
]]></string>

<!-- The text shown inside the advanced button used to expand the advanced options. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_advanced">Adhartach…</string>

<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string moz:removedIn="104" name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo" tools:ignore="UnusedResources"><![CDATA[
<label> Tha poileasaidh tèarainteachd aig <b>%1$s</b> air a bheil HTTP Strict Transport Security (HSTS), agus is ciall dha sin nach urrainn dha <b>%2$s</b> ach ceangal tèarainte a dhèanamh. Chan urrainn dhut eisgeachd a chur ris a thadhal air an làrach seo.
]]></string>

<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo2"><![CDATA[
<label> Tha poileasaidh tèarainteachd aig <b>%1$s</b> air a bheil HTTP Strict Transport Security (HSTS), agus is ciall dha sin nach urrainn dha <b>%2$s</b> ach ceangal tèarainte a dhèanamh. Chan urrainn dhut eisgeachd a chur ris a thadhal air an làrach seo.</label>
]]></string>
<!-- The text shown inside the advanced options button used to go back. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_back">Air ais</string>

<!-- The document title and heading of the error page shown when the user's network connection is interrupted while connecting to a website. -->
<string name="mozac_browser_errorpages_net_interrupt_title">Bhris rudeigin a-steach air a’ cheangal</string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:moz="http://mozac.org/tools">

<!-- The button that appears at the bottom of an error page. -->
<string name="mozac_browser_errorpages_page_refresh">Կրկին փորձել</string>
Expand Down Expand Up @@ -51,9 +51,14 @@

<!-- The text shown inside the advanced button used to expand the advanced options. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_advanced">Լրացուցիչ…</string>

<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo"><![CDATA[
<string moz:removedIn="104" name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo" tools:ignore="UnusedResources"><![CDATA[
<label> <b>%1$s</b>-ը ունի անվտանգության քաղաքականություն, որը կոչվում է HTTP Strict Transport Security (HSTS): Այն նշանակում է, որ <b>%2$s</b>-ը կարող է միայն անվտանգ կապակցում անել: Տվյալ կայքը այցելելու համար դուք չեք կարող բացառություն սահմանել:]]></string>
<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo2"><![CDATA[
<label> <b>%1$s</b>-ը ունի անվտանգության քաղաքականություն, որը կոչվում է HTTP Strict Transport Security (HSTS), ինչը նշանակում է, որ <b>%2$s</b>-ը կարող է դրան միմիայն անվտանգ կապակցվել: Դուք չեք կարող բացառություն ավելացնել տվյալ էջն այցելելու համար: </label>
]]></string>
<!-- The text shown inside the advanced options button used to go back. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_back">Հետ գնալ</string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources xmlns:tools="http://schemas.android.com/tools" xmlns:moz="http://mozac.org/tools">

<!-- The button that appears at the bottom of an error page. -->
<string name="mozac_browser_errorpages_page_refresh">Ɛreḍ tikkelt-nniḍen</string>
Expand Down Expand Up @@ -55,10 +55,14 @@

<!-- The text shown inside the advanced button used to expand the advanced options. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_advanced">Talqayt…</string>

<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo"><![CDATA[
<string moz:removedIn="104" name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo" tools:ignore="UnusedResources"><![CDATA[
<label> <b>%1$s</b> ɣur-s tasertit n tɣellist HTTP Strict Transport Security (HSTS), ay-agi yemmal-d d akken <b>%2$s</b> izmer kan ad iqqen ɣur-s s tɣellist. Ur tezmireḍ ara ad ternuḍ tasureft akken ad twaliḍ asmel-agi.
]]></string>
<!-- The advanced certificate information shown when a website uses HSTS. The %1$s will be replaced by the website URL and %2$s will be replaced by the app name. It's only shown when a website uses HSTS. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_techInfo2"><![CDATA[
<label> <b>%1$s</b> ɣur-s tasertit n tɣellist HTTP Strict Transport Security (HSTS), ay-agi yemmal-d d akken <b>%2$s</b> izmer kan ad iqqen ɣur-s s tɣellist. Ur tezmireḍ ara ad ternuḍ tasureft akken ad twaliḍ asmel-agi.</label>]]></string>
<!-- The text shown inside the advanced options button used to go back. It's only shown if the user has expanded the advanced options. -->
<string name="mozac_browser_errorpages_security_bad_hsts_cert_back">Uɣal ɣer deffir</string>

Expand Down
Loading

0 comments on commit c8974d1

Please sign in to comment.