mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] Account for Int->UInt changes in bookmarks API
This commit is contained in:
parent
0efbd3d9f5
commit
abcf8f0fb1
@ -72,7 +72,7 @@ class BookmarksUseCaseTest {
|
||||
BookmarkNodeType.ITEM,
|
||||
"987",
|
||||
"123",
|
||||
2,
|
||||
2u,
|
||||
"Firefox",
|
||||
"https://www.firefox.com",
|
||||
0,
|
||||
|
@ -133,7 +133,7 @@ internal class BookmarkAdapterTest {
|
||||
val item = testBookmarkItem("someFolder", "http://mozilla.org")
|
||||
assertTrue(createSingleItemDiffUtil(item, item).areContentsTheSame(0, 0))
|
||||
assertFalse(
|
||||
createSingleItemDiffUtil(item, item.copy(position = 1)).areContentsTheSame(0, 0)
|
||||
createSingleItemDiffUtil(item, item.copy(position = 1u)).areContentsTheSame(0, 0)
|
||||
)
|
||||
assertFalse(
|
||||
createSingleItemDiffUtil(
|
||||
|
@ -56,14 +56,14 @@ class BookmarkControllerTest {
|
||||
private val addNewTabUseCase: TabsUseCases.AddNewTabUseCase = mockk(relaxed = true)
|
||||
|
||||
private val item =
|
||||
BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null)
|
||||
BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null)
|
||||
private val subfolder =
|
||||
BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf())
|
||||
BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf())
|
||||
private val childItem = BookmarkNode(
|
||||
BookmarkNodeType.ITEM,
|
||||
"987",
|
||||
"123",
|
||||
2,
|
||||
2u,
|
||||
"Firefox",
|
||||
"https://www.mozilla.org/en-US/firefox/",
|
||||
0,
|
||||
@ -73,14 +73,14 @@ class BookmarkControllerTest {
|
||||
BookmarkNodeType.FOLDER,
|
||||
"123",
|
||||
null,
|
||||
0,
|
||||
0u,
|
||||
"Mobile",
|
||||
null,
|
||||
0,
|
||||
listOf(item, item, childItem, subfolder)
|
||||
)
|
||||
private val root = BookmarkNode(
|
||||
BookmarkNodeType.FOLDER, BookmarkRoot.Root.id, null, 0, BookmarkRoot.Root.name, null, 0, null
|
||||
BookmarkNodeType.FOLDER, BookmarkRoot.Root.id, null, 0u, BookmarkRoot.Root.name, null, 0, null
|
||||
)
|
||||
|
||||
@Before
|
||||
|
@ -24,7 +24,7 @@ class BookmarkDeselectNavigationListenerTest {
|
||||
BookmarkNodeType.ITEM,
|
||||
BookmarkRoot.Root.id,
|
||||
parentGuid = null,
|
||||
position = 0,
|
||||
position = 0u,
|
||||
title = null,
|
||||
url = null,
|
||||
dateAdded = 0,
|
||||
|
@ -23,11 +23,11 @@ class BookmarkFragmentInteractorTest {
|
||||
private val bookmarkController: DefaultBookmarkController = mockk(relaxed = true)
|
||||
private val metrics: MetricController = mockk(relaxed = true)
|
||||
|
||||
private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null)
|
||||
private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1, null, null, 0, null)
|
||||
private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf())
|
||||
private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null)
|
||||
private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1u, null, null, 0, null)
|
||||
private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf())
|
||||
private val tree: BookmarkNode = BookmarkNode(
|
||||
BookmarkNodeType.FOLDER, "123", null, 0, "Mobile", null, 0, listOf(item, separator, item, subfolder)
|
||||
BookmarkNodeType.FOLDER, "123", null, 0u, "Mobile", null, 0, listOf(item, separator, item, subfolder)
|
||||
)
|
||||
|
||||
@Before
|
||||
|
@ -214,27 +214,27 @@ class BookmarkFragmentStoreTest {
|
||||
assertEquals(BookmarkFragmentState.Mode.Syncing, store.state.mode)
|
||||
}
|
||||
|
||||
private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", 0, null)
|
||||
private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1, null, null, 0, null)
|
||||
private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0, "Subfolder", null, 0, listOf())
|
||||
private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0u, "Mozilla", "http://mozilla.org", 0, null)
|
||||
private val separator = BookmarkNode(BookmarkNodeType.SEPARATOR, "789", "123", 1u, null, null, 0, null)
|
||||
private val subfolder = BookmarkNode(BookmarkNodeType.FOLDER, "987", "123", 0u, "Subfolder", null, 0, listOf())
|
||||
private val childItem = BookmarkNode(
|
||||
BookmarkNodeType.ITEM,
|
||||
"987",
|
||||
"123",
|
||||
2,
|
||||
2u,
|
||||
"Firefox",
|
||||
"https://www.mozilla.org/en-US/firefox/",
|
||||
0,
|
||||
null
|
||||
)
|
||||
private val tree = BookmarkNode(
|
||||
BookmarkNodeType.FOLDER, "123", null, 0, "Mobile", null, 0, listOf(item, separator, childItem, subfolder)
|
||||
BookmarkNodeType.FOLDER, "123", null, 0u, "Mobile", null, 0, listOf(item, separator, childItem, subfolder)
|
||||
)
|
||||
private val newTree = BookmarkNode(
|
||||
BookmarkNodeType.FOLDER,
|
||||
"123",
|
||||
null,
|
||||
0,
|
||||
0u,
|
||||
"Mobile",
|
||||
null,
|
||||
0,
|
||||
@ -244,7 +244,7 @@ class BookmarkFragmentStoreTest {
|
||||
BookmarkNodeType.FOLDER,
|
||||
"root________",
|
||||
null,
|
||||
0,
|
||||
0u,
|
||||
"Desktop Bookmarks",
|
||||
null,
|
||||
0,
|
||||
|
@ -32,7 +32,7 @@ class DesktopFoldersTest {
|
||||
guid = BookmarkRoot.Root.id,
|
||||
parentGuid = null,
|
||||
title = BookmarkRoot.Root.name,
|
||||
position = 0,
|
||||
position = 0u,
|
||||
url = null,
|
||||
dateAdded = 0,
|
||||
children = null
|
||||
|
@ -86,7 +86,7 @@ internal fun testBookmarkItem(parentGuid: String, url: String, title: String = "
|
||||
BookmarkNodeType.ITEM,
|
||||
"guid#${Math.random() * 1000}",
|
||||
parentGuid,
|
||||
0,
|
||||
0u,
|
||||
title,
|
||||
url,
|
||||
0,
|
||||
@ -97,7 +97,7 @@ internal fun testFolder(guid: String, parentGuid: String?, children: List<Bookma
|
||||
BookmarkNodeType.FOLDER,
|
||||
guid,
|
||||
parentGuid,
|
||||
0,
|
||||
0u,
|
||||
title,
|
||||
null,
|
||||
0,
|
||||
|
@ -39,7 +39,7 @@ class BookmarkNodeViewHolderTest {
|
||||
type = BookmarkNodeType.ITEM,
|
||||
guid = "456",
|
||||
parentGuid = "123",
|
||||
position = 0,
|
||||
position = 0u,
|
||||
title = "Mozilla",
|
||||
url = "https://www.mozilla.org",
|
||||
dateAdded = 0,
|
||||
@ -49,7 +49,7 @@ class BookmarkNodeViewHolderTest {
|
||||
type = BookmarkNodeType.FOLDER,
|
||||
guid = "456",
|
||||
parentGuid = "123",
|
||||
position = 0,
|
||||
position = 0u,
|
||||
title = "Folder",
|
||||
url = null,
|
||||
dateAdded = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user