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

« back to all changes in this revision

Viewing changes to tests/autopilot/webbrowser_app/tests/test_toolbar.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 webbrowser_app.tests import BrowserTestCaseBase
 
12
 
 
13
 
 
14
class TestToolbar(BrowserTestCaseBase):
 
15
 
 
16
    """Tests interaction with the toolbar."""
 
17
 
 
18
    def test_reveal_chrome(self):
 
19
        self.ensure_chrome_is_hidden()
 
20
        self.reveal_chrome()
 
21
        self.assert_chrome_eventually_shown()
 
22
 
 
23
    def test_hide_chrome(self):
 
24
        self.ensure_chrome_is_hidden()
 
25
        self.reveal_chrome()
 
26
        self.hide_chrome()
 
27
        self.assert_chrome_eventually_hidden()
 
28
 
 
29
    def test_unfocus_chrome_hides_it(self):
 
30
        webview = self.main_window.get_web_view()
 
31
        self.ensure_chrome_is_hidden()
 
32
        self.reveal_chrome()
 
33
        self.pointing_device.move_to_object(webview)
 
34
        self.pointing_device.click()
 
35
        self.assert_chrome_eventually_hidden()