~ubuntu-branches/ubuntu/wily/webbrowser-app/wily-proposed

« back to all changes in this revision

Viewing changes to tests/autopilot/webbrowser_app/tests/test_errorsheet.py

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2013-06-05 05:03:05 UTC
  • Revision ID: package-import@ubuntu.com-20130605050305-qgpd9x3s01m06dca
Tags: upstream-0.20daily13.06.05
ImportĀ upstreamĀ versionĀ 0.20daily13.06.05

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
#
 
3
# Copyright 2013 Canonical
 
4
#
 
5
# This program is free software: you can redistribute it and/or modify it
 
6
# under the terms of the GNU General Public License version 3, as published
 
7
# by the Free Software Foundation.
 
8
 
 
9
from __future__ import absolute_import
 
10
 
 
11
from testtools.matchers import Equals
 
12
from autopilot.matchers import Eventually
 
13
 
 
14
from webbrowser_app.tests import StartOpenLocalPageTestCaseBase
 
15
 
 
16
 
 
17
class TestErrorSheet(StartOpenLocalPageTestCaseBase):
 
18
 
 
19
    """Tests the error message functionality."""
 
20
 
 
21
    def test_invalid_url_triggers_error_message(self):
 
22
        error = self.main_window.get_error_sheet()
 
23
        self.assertThat(error.visible, Equals(False))
 
24
        self.go_to_url("htpp://invalid")
 
25
        self.assertThat(error.visible, Eventually(Equals(True)))