267 lines
12 KiB
Diff
267 lines
12 KiB
Diff
|
From 2b242f3c2958889bacd34c5d87058153b9fb1856 Mon Sep 17 00:00:00 2001
|
||
|
From: harvey186 <harvey186@hotmail.com>
|
||
|
Date: Fri, 11 Oct 2024 16:20:41 +0200
|
||
|
Subject: [PATCH] 131-swisscows-1
|
||
|
|
||
|
---
|
||
|
android-components | 2 +-
|
||
|
.../java/org/mozilla/fenix/settings/SupportUtils.kt | 2 +-
|
||
|
.../main/java/org/mozilla/fenix/tabstray/TabsTray.kt | 4 ++--
|
||
|
.../fenix/tabstray/inactivetabs/InactiveTabs.kt | 4 ++--
|
||
|
.../fenix/tabstray/syncedtabs/SyncedTabsList.kt | 4 ++--
|
||
|
.../components/history/PagedHistoryProviderTest.kt | 4 ++--
|
||
|
.../org/mozilla/fenix/components/menu/MenuStoreTest.kt | 10 +++++-----
|
||
|
.../fenix/home/DefaultSessionControlControllerTest.kt | 4 ++--
|
||
|
.../mozilla/fenix/search/SearchDialogControllerTest.kt | 10 +++++-----
|
||
|
.../fenix/tabstray/DefaultTabsTrayControllerTest.kt | 8 ++++----
|
||
|
10 files changed, 26 insertions(+), 26 deletions(-)
|
||
|
|
||
|
diff --git a/android-components b/android-components
|
||
|
index 5306637e2f..f8da964b2a 160000
|
||
|
--- a/android-components
|
||
|
+++ b/android-components
|
||
|
@@ -1 +1 @@
|
||
|
-Subproject commit 5306637e2fc5cb4dbf037341356d4210864b424e
|
||
|
+Subproject commit f8da964b2aa0d181466c8e3a48201257800a7784
|
||
|
diff --git a/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt b/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
||
|
index 3f4bec739b..a03518c135 100644
|
||
|
--- a/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
||
|
+++ b/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
|
||
|
@@ -25,7 +25,7 @@ object SupportUtils {
|
||
|
const val POCKET_TRENDING_URL = "https://getpocket.com/fenix-top-articles"
|
||
|
const val WIKIPEDIA_URL = "https://www.wikipedia.org/"
|
||
|
const val FENIX_PLAY_STORE_URL = "https://play.google.com/store/apps/details?id=${BuildConfig.APPLICATION_ID}"
|
||
|
- const val GOOGLE_URL = "https://www.google.com/"
|
||
|
+ const val GOOGLE_URL = "https://swisscows.com/"
|
||
|
const val BAIDU_URL = "https://m.baidu.com/"
|
||
|
const val JD_URL = "https://union-click.jd.com/jdc" +
|
||
|
"?e=&p=AyIGZRprFDJWWA1FBCVbV0IUWVALHFRBEwQAQB1AWQkFVUVXfFkAF14lRFRbJXstVWR3WQ1rJ08AZnhS" +
|
||
|
diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTray.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTray.kt
|
||
|
index f100b49d5b..be693fa5e9 100644
|
||
|
--- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTray.kt
|
||
|
+++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTray.kt
|
||
|
@@ -484,8 +484,8 @@ private fun generateFakeSyncedTabsList(deviceCount: Int = 1): List<SyncedTabsLis
|
||
|
displayName = "Device $index",
|
||
|
tabs = listOf(
|
||
|
generateFakeSyncedTab("Mozilla", "www.mozilla.org"),
|
||
|
- generateFakeSyncedTab("Google", "www.google.com"),
|
||
|
- generateFakeSyncedTab("", "www.google.com"),
|
||
|
+ generateFakeSyncedTab("Google", "swisscows.com"),
|
||
|
+ generateFakeSyncedTab("", "swisscows.com"),
|
||
|
),
|
||
|
)
|
||
|
}
|
||
|
diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/inactivetabs/InactiveTabs.kt b/app/src/main/java/org/mozilla/fenix/tabstray/inactivetabs/InactiveTabs.kt
|
||
|
index da27e5b91e..e590110c46 100644
|
||
|
--- a/app/src/main/java/org/mozilla/fenix/tabstray/inactivetabs/InactiveTabs.kt
|
||
|
+++ b/app/src/main/java/org/mozilla/fenix/tabstray/inactivetabs/InactiveTabs.kt
|
||
|
@@ -340,13 +340,13 @@ private fun generateFakeInactiveTabsList(): List<TabSessionState> =
|
||
|
TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.mozilla.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
)
|
||
|
diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/syncedtabs/SyncedTabsList.kt b/app/src/main/java/org/mozilla/fenix/tabstray/syncedtabs/SyncedTabsList.kt
|
||
|
index a2a9aaefeb..83c2f18c3b 100644
|
||
|
--- a/app/src/main/java/org/mozilla/fenix/tabstray/syncedtabs/SyncedTabsList.kt
|
||
|
+++ b/app/src/main/java/org/mozilla/fenix/tabstray/syncedtabs/SyncedTabsList.kt
|
||
|
@@ -312,8 +312,8 @@ internal fun getFakeSyncedTabList(): List<SyncedTabsListItem> = listOf(
|
||
|
displayName = "Device 1",
|
||
|
tabs = listOf(
|
||
|
generateFakeTab("Mozilla", "www.mozilla.org"),
|
||
|
- generateFakeTab("Google", "www.google.com"),
|
||
|
- generateFakeTab("", "www.google.com"),
|
||
|
+ generateFakeTab("Google", "swisscows.com"),
|
||
|
+ generateFakeTab("", "swisscows.com"),
|
||
|
),
|
||
|
),
|
||
|
SyncedTabsListItem.DeviceSection(
|
||
|
diff --git a/app/src/test/java/org/mozilla/fenix/components/history/PagedHistoryProviderTest.kt b/app/src/test/java/org/mozilla/fenix/components/history/PagedHistoryProviderTest.kt
|
||
|
index aa7aa1db40..277ee5364e 100644
|
||
|
--- a/app/src/test/java/org/mozilla/fenix/components/history/PagedHistoryProviderTest.kt
|
||
|
+++ b/app/src/test/java/org/mozilla/fenix/components/history/PagedHistoryProviderTest.kt
|
||
|
@@ -303,7 +303,7 @@ class PagedHistoryProviderTest {
|
||
|
isRemote = false,
|
||
|
)
|
||
|
val visitInfo3 = VisitInfo(
|
||
|
- url = "http://www.google.com/link?url=http://www.firefox.com",
|
||
|
+ url = "https://swisscows.com/link?url=http://www.firefox.com",
|
||
|
title = "",
|
||
|
visitTime = 1,
|
||
|
visitType = VisitType.REDIRECT_TEMPORARY,
|
||
|
@@ -339,7 +339,7 @@ class PagedHistoryProviderTest {
|
||
|
documentType = DocumentType.Regular,
|
||
|
previewImageUrl = null,
|
||
|
)
|
||
|
- val historyMetadataKey3 = HistoryMetadataKey("http://www.google.com/link?url=http://www.firefox.com", "mozilla", null)
|
||
|
+ val historyMetadataKey3 = HistoryMetadataKey("https://swisscows.com/link?url=http://www.firefox.com", "mozilla", null)
|
||
|
val historyEntry3 = HistoryMetadata(
|
||
|
key = historyMetadataKey3,
|
||
|
title = "",
|
||
|
diff --git a/app/src/test/java/org/mozilla/fenix/components/menu/MenuStoreTest.kt b/app/src/test/java/org/mozilla/fenix/components/menu/MenuStoreTest.kt
|
||
|
index 2a9c35bb4e..0691d79d41 100644
|
||
|
--- a/app/src/test/java/org/mozilla/fenix/components/menu/MenuStoreTest.kt
|
||
|
+++ b/app/src/test/java/org/mozilla/fenix/components/menu/MenuStoreTest.kt
|
||
|
@@ -118,7 +118,7 @@ class MenuStoreTest {
|
||
|
selectedTab = TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
bookmarkState = BookmarkState(),
|
||
|
@@ -138,7 +138,7 @@ class MenuStoreTest {
|
||
|
selectedTab = TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
bookmarkState = BookmarkState(),
|
||
|
@@ -166,7 +166,7 @@ class MenuStoreTest {
|
||
|
selectedTab = TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
isPinned = false,
|
||
|
@@ -186,7 +186,7 @@ class MenuStoreTest {
|
||
|
selectedTab = TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
isPinned = false,
|
||
|
@@ -206,7 +206,7 @@ class MenuStoreTest {
|
||
|
selectedTab = TabSessionState(
|
||
|
id = "tabId",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
),
|
||
|
isPinned = false,
|
||
|
diff --git a/app/src/test/java/org/mozilla/fenix/home/DefaultSessionControlControllerTest.kt b/app/src/test/java/org/mozilla/fenix/home/DefaultSessionControlControllerTest.kt
|
||
|
index d5aa5a240c..29722b53a8 100644
|
||
|
--- a/app/src/test/java/org/mozilla/fenix/home/DefaultSessionControlControllerTest.kt
|
||
|
+++ b/app/src/test/java/org/mozilla/fenix/home/DefaultSessionControlControllerTest.kt
|
||
|
@@ -111,8 +111,8 @@ class DefaultSessionControlControllerTest {
|
||
|
name = "Google Test Engine",
|
||
|
icon = mockk(relaxed = true),
|
||
|
type = SearchEngine.Type.BUNDLED,
|
||
|
- resultUrls = listOf("https://www.google.com/?q={searchTerms}"),
|
||
|
- suggestUrl = "https://www.google.com/",
|
||
|
+ resultUrls = listOf("https://swisscows.com/en/web?query={searchTerms}"),
|
||
|
+ suggestUrl = "https://swisscows.com/",
|
||
|
)
|
||
|
|
||
|
private val duckDuckGoSearchEngine = SearchEngine(
|
||
|
diff --git a/app/src/test/java/org/mozilla/fenix/search/SearchDialogControllerTest.kt b/app/src/test/java/org/mozilla/fenix/search/SearchDialogControllerTest.kt
|
||
|
index dc573e9ed0..d6766a6a29 100644
|
||
|
--- a/app/src/test/java/org/mozilla/fenix/search/SearchDialogControllerTest.kt
|
||
|
+++ b/app/src/test/java/org/mozilla/fenix/search/SearchDialogControllerTest.kt
|
||
|
@@ -102,7 +102,7 @@ class SearchDialogControllerTest {
|
||
|
|
||
|
@Test
|
||
|
fun `GIVEN default search engine is selected WHEN url is committed THEN load the url`() {
|
||
|
- val url = "https://www.google.com/"
|
||
|
+ val url = "https://swisscows.com/"
|
||
|
assertNull(Events.enteredUrl.testGetValue())
|
||
|
|
||
|
every { store.state.defaultEngine } returns searchEngine
|
||
|
@@ -133,7 +133,7 @@ class SearchDialogControllerTest {
|
||
|
|
||
|
@Test
|
||
|
fun `GIVEN default search engine is selected and homepage as a new tab is enabled WHEN url is committed THEN load the url`() {
|
||
|
- val url = "https://www.google.com/"
|
||
|
+ val url = "https://swisscows.com/"
|
||
|
assertNull(Events.enteredUrl.testGetValue())
|
||
|
|
||
|
every { store.state.defaultEngine } returns searchEngine
|
||
|
@@ -166,7 +166,7 @@ class SearchDialogControllerTest {
|
||
|
|
||
|
@Test
|
||
|
fun `GIVEN a general search engine is selected WHEN url is committed THEN perform search`() {
|
||
|
- val url = "https://www.google.com/"
|
||
|
+ val url = "https://swisscows.com/"
|
||
|
assertNull(Events.enteredUrl.testGetValue())
|
||
|
|
||
|
every { store.state.defaultEngine } returns mockk(relaxed = true)
|
||
|
@@ -439,7 +439,7 @@ class SearchDialogControllerTest {
|
||
|
|
||
|
@Test
|
||
|
fun handleUrlTapped() {
|
||
|
- val url = "https://www.google.com/"
|
||
|
+ val url = "https://swisscows.com/"
|
||
|
val flags = EngineSession.LoadUrlFlags.all()
|
||
|
assertNull(Events.enteredUrl.testGetValue())
|
||
|
|
||
|
@@ -470,7 +470,7 @@ class SearchDialogControllerTest {
|
||
|
|
||
|
@Test
|
||
|
fun `GIVEN homepage as a new tab is enabled WHEN an url suggestion is tapped THEN load url in the existing tab`() {
|
||
|
- val url = "https://www.google.com/"
|
||
|
+ val url = "https://swisscows.com/"
|
||
|
val flags = EngineSession.LoadUrlFlags.all()
|
||
|
|
||
|
assertNull(Events.enteredUrl.testGetValue())
|
||
|
diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/DefaultTabsTrayControllerTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/DefaultTabsTrayControllerTest.kt
|
||
|
index 1248a8fb46..5be6f31015 100644
|
||
|
--- a/app/src/test/java/org/mozilla/fenix/tabstray/DefaultTabsTrayControllerTest.kt
|
||
|
+++ b/app/src/test/java/org/mozilla/fenix/tabstray/DefaultTabsTrayControllerTest.kt
|
||
|
@@ -675,7 +675,7 @@ class DefaultTabsTrayControllerTest {
|
||
|
val tab2 = TabSessionState(
|
||
|
id = "2",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
)
|
||
|
trayStore.dispatch(TabsTrayAction.ExitSelectMode)
|
||
|
@@ -700,7 +700,7 @@ class DefaultTabsTrayControllerTest {
|
||
|
val tab2 = TabSessionState(
|
||
|
id = "2",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
)
|
||
|
val controller = spyk(createController())
|
||
|
@@ -732,7 +732,7 @@ class DefaultTabsTrayControllerTest {
|
||
|
val tab2 = TabSessionState(
|
||
|
id = "2",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
)
|
||
|
|
||
|
@@ -763,7 +763,7 @@ class DefaultTabsTrayControllerTest {
|
||
|
val inactiveTab = TabSessionState(
|
||
|
id = "2",
|
||
|
content = ContentState(
|
||
|
- url = "www.google.com",
|
||
|
+ url = "swisscows.com",
|
||
|
),
|
||
|
)
|
||
|
|
||
|
--
|
||
|
2.34.1
|
||
|
|