[Merge] lp:~rpadovani/webbrowser-app/remove-404-history into lp:webbrowser-app

Olivier Tilloy olivier.tilloy at canonical.com
Mon May 25 13:13:10 UTC 2015


Review: Needs Fixing

That test fails with the following error:

Traceback (most recent call last):
  File "/home/osomon/dev/phablet/browser/webbrowser-app/tests/autopilot/webbrowser_app/tests/test_history.py", line 41, in test_history_save_200
    Eventually(Equals(2)))
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 423, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: After 10.0 seconds test failed: 2 != 1


The reason is that history entries are grouped by domain in the history view, so all two pages are grouped into one single entry for the http://test/ domain.

This makes me realize that the other test is not really testing anything. To verify that the 404 page was not stored, we need to open the extended history view corresponding to the test domain, and verify that there is only one entry there.

For the new test, no need to browse to a different page, the page on which we start should be stored already, so just verifying that there is one entry in the extended view should be enough.

And in fact the new test can be factored into the existing one: if we open the extended view to verify that the 404 page wasn’t recorded, we can also verify that the 200 page was recorded (by comparing the 'url' property of the UrlDelegate to self.url.

In the emulators, HistoryView.get_history_urls will need to be renamed to something better suited, e.g. something like HistoryView.get_domain_entries.
-- 
https://code.launchpad.net/~rpadovani/webbrowser-app/remove-404-history/+merge/259313
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.



More information about the Ubuntu-reviews mailing list