1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

WebTabTest: Add saveNotRestoredTabTest

This commit is contained in:
David Rosca 2018-02-16 12:09:56 +01:00
parent c83f7e3c01
commit e20c3909e5
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
2 changed files with 17 additions and 0 deletions

View File

@ -273,4 +273,20 @@ void WebTabTest::loadNotRestoredTabTest()
QCOMPARE(tab.webView()->history()->backItem().url(), QUrl("qrc:autotests/data/basic_page.html"));
}
void WebTabTest::saveNotRestoredTabTest()
{
WebTab tab;
tab.load(QUrl("qrc:autotests/data/basic_page.html"));
QVERIFY(waitForLoadfinished(&tab));
QTRY_COMPARE(tab.webView()->history()->count(), 1);
tab.unload();
QVERIFY(!tab.isRestored());
WebTab::SavedTab saved(&tab);
QVERIFY(saved.isValid());
QCOMPARE(saved.url, QUrl("qrc:autotests/data/basic_page.html"));
}
FALKONTEST_MAIN(WebTabTest)

View File

@ -32,4 +32,5 @@ private slots:
void prependChildTabsTest();
void moveTabTest();
void loadNotRestoredTabTest();
void saveNotRestoredTabTest();
};