~osomon/webbrowser-app/find-in-page

« back to all changes in this revision

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

  • Committer: Olivier Tilloy
  • Date: 2015-07-02 09:49:21 UTC
  • Revision ID: olivier.tilloy@canonical.com-20150702094921-3x5jx0x25z9adwcw
Exit find in page mode when navigating.

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        bar.write("hello")
133
133
        self.assertThat(next.enabled, Eventually(Equals(False)))
134
134
        self.assertThat(prev.enabled, Eventually(Equals(False)))
 
135
 
 
136
    def test_navigation_exits_findinpage_mode(self):
 
137
        url = self.base_url + "/testlink"
 
138
        self.main_window.go_to_url(url)
 
139
        self.main_window.wait_until_page_loaded(url)
 
140
        self.activate_find_in_page(False)
 
141
        bar = self.chrome.address_bar
 
142
        self.assertThat(bar.findInPageMode, Eventually(Equals(True)))
 
143
        webview = self.main_window.get_current_webview()
 
144
        self.pointing_device.click_object(webview)
 
145
        self.assertThat(bar.findInPageMode, Eventually(Equals(False)))