mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
plasma: testing build fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
28952ca264
commit
f5e1f7f166
1 changed files with 9 additions and 11 deletions
|
@ -66,13 +66,11 @@ void TestChromeBookmarks::itShouldGracefullyExitWhenFileIsNotFound()
|
|||
}
|
||||
|
||||
|
||||
void verifyMatch(BookmarkMatch &match, const QString &title, const QString &url, qreal relevance, QueryMatch::Type type) {
|
||||
void verifyMatch(BookmarkMatch &match, const QString &title, const QString &url, qreal relevance) {
|
||||
QueryMatch queryMatch = match.asQueryMatch(NULL);
|
||||
QCOMPARE(queryMatch.text(), title);
|
||||
QCOMPARE(queryMatch.data().toString(), url);
|
||||
QCOMPARE(queryMatch.relevance(), relevance);
|
||||
QVERIFY2(queryMatch.type() == type,
|
||||
QString("Wrong query match type: expecting %1 but was %2").arg(type).arg(queryMatch.type() ).toAscii());
|
||||
}
|
||||
|
||||
void TestChromeBookmarks::itShouldFindAllBookmarks()
|
||||
|
@ -81,9 +79,9 @@ void TestChromeBookmarks::itShouldFindAllBookmarks()
|
|||
chrome->prepare();
|
||||
QList<BookmarkMatch> matches = chrome->match("any", true);
|
||||
QCOMPARE(matches.size(), 3);
|
||||
verifyMatch(matches[0], "some bookmark in bookmark bar", "http://somehost.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[1], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[2], "bookmark in somefolder", "http://somefolder.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[0], "some bookmark in bookmark bar", "http://somehost.com/", 0.18);
|
||||
verifyMatch(matches[1], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.18);
|
||||
verifyMatch(matches[2], "bookmark in somefolder", "http://somefolder.com/", 0.18);
|
||||
}
|
||||
|
||||
void TestChromeBookmarks::itShouldFindOnlyMatches()
|
||||
|
@ -92,7 +90,7 @@ void TestChromeBookmarks::itShouldFindOnlyMatches()
|
|||
chrome->prepare();
|
||||
QList<BookmarkMatch> matches = chrome->match("other", false);
|
||||
QCOMPARE(matches.size(), 1);
|
||||
verifyMatch(matches[0], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.45, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[0], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.45);
|
||||
}
|
||||
|
||||
void TestChromeBookmarks::itShouldClearResultAfterCallingTeardown()
|
||||
|
@ -114,10 +112,10 @@ void TestChromeBookmarks::itShouldFindBookmarksFromAllProfiles()
|
|||
chrome->prepare();
|
||||
QList<BookmarkMatch> matches = chrome->match("any", true);
|
||||
QCOMPARE(matches.size(), 4);
|
||||
verifyMatch(matches[0], "some bookmark in bookmark bar", "http://somehost.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[1], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[2], "bookmark in somefolder", "http://somefolder.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[3], "bookmark in secondProfile", "http://secondprofile.com/", 0.18, QueryMatch::PossibleMatch);
|
||||
verifyMatch(matches[0], "some bookmark in bookmark bar", "http://somehost.com/", 0.18);
|
||||
verifyMatch(matches[1], "bookmark in other bookmarks", "http://otherbookmarks.com/", 0.18);
|
||||
verifyMatch(matches[2], "bookmark in somefolder", "http://somefolder.com/", 0.18);
|
||||
verifyMatch(matches[3], "bookmark in secondProfile", "http://secondprofile.com/", 0.18);
|
||||
}
|
||||
|
||||
#include "moc_testchromebookmarks.cpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue