[Merge] lp:~artmello/webbrowser-app/webbrowser-app-bookmarks_top_sites into lp:webbrowser-app
Olivier Tilloy
olivier.tilloy at canonical.com
Fri Jul 4 07:26:20 UTC 2014
1197 + void shouldLimitEntries()
1198 + {
1199 + model->setLimit(2);
1200 +
1201 + history->add(QUrl("http://example1.org/"), "Example 1 Domain", QUrl());
1202 + QTest::qWait(1001);
1203 + history->add(QUrl("http://example2.org/"), "Example 2 Domain", QUrl());
1204 + QTest::qWait(1001);
1205 + history->add(QUrl("http://example3.org/"), "Example 3 Domain", QUrl());
1206 +
1207 + QCOMPARE(model->rowCount(), 2);
1208 + QCOMPARE(model->unlimitedRowCount(), 3);
1209 + }
It would be useful to test additional conditions:
- checking that the initial value of the limit is -1
- setting the limit to -1
- setting the limit to a number greater than the number of entries
- setting the limit after populating the history model, to verify that it is correctly updated
--
https://code.launchpad.net/~artmello/webbrowser-app/webbrowser-app-bookmarks_top_sites/+merge/224592
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.
More information about the Ubuntu-reviews
mailing list