Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
fenix
Commits
9272026b
Commit
9272026b
authored
Jun 03, 2020
by
person808
Committed by
Kainalu Hagiwara
Jun 03, 2020
Browse files
For #10193 - Remove page title when sharing links
parent
a7e74e30
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/org/mozilla/fenix/share/ShareController.kt
View file @
9272026b
...
...
@@ -172,7 +172,7 @@ class DefaultShareController(
@VisibleForTesting
fun
getShareText
()
=
shareData
.
joinToString
(
"\n\n"
)
{
data
->
listOfNotNull
(
data
.
title
,
data
.
url
).
joinToString
(
"\n"
)
data
.
url
.
orEmpty
(
)
}
// Navigation between app fragments uses ShareTab as arguments. SendTabUseCases uses TabData.
...
...
app/src/test/java/org/mozilla/fenix/share/ShareControllerTest.kt
View file @
9272026b
...
...
@@ -39,8 +39,8 @@ import org.mozilla.fenix.components.metrics.Event
import
org.mozilla.fenix.components.metrics.MetricController
import
org.mozilla.fenix.ext.metrics
import
org.mozilla.fenix.ext.nav
import
org.mozilla.fenix.share.listadapters.AppShareOption
import
org.mozilla.fenix.helpers.FenixRobolectricTestRunner
import
org.mozilla.fenix.share.listadapters.AppShareOption
@RunWith
(
FenixRobolectricTestRunner
::
class
)
@ExperimentalCoroutinesApi
...
...
@@ -57,7 +57,7 @@ class ShareControllerTest {
TabData
(
"title0"
,
"url0"
),
TabData
(
"title1"
,
"url1"
)
)
private
val
textToShare
=
"${shareData[0].
title}\n${shareData[0].url}\n\n${shareData[1].title}
\n${shareData[1].url}"
private
val
textToShare
=
"${shareData[0].
url}\n
\n${shareData[1].url}"
private
val
testCoroutineScope
=
TestCoroutineScope
()
private
val
sendTabUseCases
=
mockk
<
SendTabUseCases
>(
relaxed
=
true
)
private
val
snackbar
=
mockk
<
FenixSnackbar
>(
relaxed
=
true
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment