Verified Commit 6d493cf1 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Fix tabsmodeltest

parent 5fc13a02
......@@ -96,7 +96,11 @@ private Q_SLOTS:
m_tabsModel->newTab("second");
m_tabsModel->newTab("third");
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({TabState("about:blank", true), TabState("second", true), TabState("third", true)}));
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({
TabState("about:blank", m_tabsModel->isMobileDefault()),
TabState("second", m_tabsModel->isMobileDefault()),
TabState("third", m_tabsModel->isMobileDefault())
}));
// current tab is 2
// close tab "second"
......@@ -105,12 +109,18 @@ private Q_SLOTS:
QCOMPARE(m_tabsModel->currentTab(), 0);
// "second" is indeed gone
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({TabState("about:blank", true), TabState("third", true)}));
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({
TabState("about:blank", m_tabsModel->isMobileDefault()),
TabState("third", m_tabsModel->isMobileDefault())
}));
}
void testSetTab() {
m_tabsModel->setUrl(0, QStringLiteral("https://debian.org"));
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({TabState("https://debian.org", true), TabState("third", true)}));
QCOMPARE(m_tabsModel->tabs(), QVector<TabState>({
TabState("https://debian.org", m_tabsModel->isMobileDefault()),
TabState("third", m_tabsModel->isMobileDefault())}
));
}
void testPrivateMode() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment