Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ class SyncedTabsStorageTest {
store = BrowserStore(
BrowserState(
tabs = listOf(
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L),
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L, createdAt = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L, createdAt = 124L),
createTab(
id = "private",
url = "https://private.tab",
private = true,
lastAccess = 125L,
createdAt = 125L,
),
),
selectedTabId = "tab1",
Expand Down Expand Up @@ -264,8 +265,8 @@ class SyncedTabsStorageTest {
val store = BrowserStore(
BrowserState(
tabs = listOf(
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L),
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L, createdAt = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L, createdAt = 124L),
),
selectedTabId = "tab1",
),
Expand Down Expand Up @@ -305,8 +306,8 @@ class SyncedTabsStorageTest {
val store = BrowserStore(
BrowserState(
tabs = listOf(
createUnloadedTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L),
createUnloadedTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L),
createUnloadedTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L, createdAt = 123L),
createUnloadedTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L, createdAt = 124L),
),
selectedTabId = "tab1",
),
Expand Down Expand Up @@ -373,8 +374,8 @@ class SyncedTabsStorageTest {
val store = BrowserStore(
BrowserState(
tabs = listOf(
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L),
createTab(id = "tab1", url = "https://www.mozilla.org", lastAccess = 123L, createdAt = 123L),
createTab(id = "tab2", url = "https://www.foo.bar", lastAccess = 124L, createdAt = 124L),
),
selectedTabId = "tab1",
),
Expand Down Expand Up @@ -409,7 +410,8 @@ class SyncedTabsStorageTest {
)
}

private fun createUnloadedTab(id: String, url: String, lastAccess: Long) = createTab(id = id, url = url, lastAccess = lastAccess).run {
copy(content = this.content.copy(loading = true))
}
private fun createUnloadedTab(id: String, url: String, lastAccess: Long, createdAt: Long = lastAccess) =
createTab(id = id, url = url, lastAccess = lastAccess, createdAt = createdAt).run {
copy(content = this.content.copy(loading = true))
}
}
Loading