diff --git a/plasma/runners/bookmarks/tests/testchromebookmarks.cpp b/plasma/runners/bookmarks/tests/testchromebookmarks.cpp index f538d61c..8eed55e1 100644 --- a/plasma/runners/bookmarks/tests/testchromebookmarks.cpp +++ b/plasma/runners/bookmarks/tests/testchromebookmarks.cpp @@ -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 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 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 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"