Merge lp:~osomon/webbrowser-app/navigation-discard-selection into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 933
Merged at revision: 942
Proposed branch: lp:~osomon/webbrowser-app/navigation-discard-selection
Merge into: lp:webbrowser-app
Diff against target: 39 lines (+8/-2)
2 files modified
src/Ubuntu/Web/UbuntuWebView02.qml (+3/-1)
tests/autopilot/webbrowser_app/tests/test_selection.py (+5/-1)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/navigation-discard-selection
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+253332@code.launchpad.net

Commit message

Discard selection when navigating away.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Web/UbuntuWebView02.qml'
2--- src/Ubuntu/Web/UbuntuWebView02.qml 2015-02-16 11:51:20 +0000
3+++ src/Ubuntu/Web/UbuntuWebView02.qml 2015-03-18 10:51:44 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright 2013-2014 Canonical Ltd.
7+ * Copyright 2013-2015 Canonical Ltd.
8 *
9 * This file is part of webbrowser-app.
10 *
11@@ -257,6 +257,8 @@
12 if (loadEvent.url.toString() !== "data:text/html,chromewebdata") {
13 internal.lastLoadRequestStatus = loadEvent.type
14 }
15+ internal.dismissCurrentContextualMenu()
16+ internal.dismissCurrentSelection()
17 }
18
19 readonly property int screenOrientation: Screen.orientation
20
21=== modified file 'tests/autopilot/webbrowser_app/tests/test_selection.py'
22--- tests/autopilot/webbrowser_app/tests/test_selection.py 2014-12-13 02:46:27 +0000
23+++ tests/autopilot/webbrowser_app/tests/test_selection.py 2015-03-18 10:51:44 +0000
24@@ -1,6 +1,6 @@
25 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
26 #
27-# Copyright 2014 Canonical
28+# Copyright 2014-2015 Canonical
29 #
30 # This program is free software: you can redistribute it and/or modify it
31 # under the terms of the GNU General Public License version 3, as published
32@@ -89,3 +89,7 @@
33 self.assertThat(self.rectangle.globalRect, Eventually(Equals(rect)))
34 self.actions.wait_until_destroyed()
35 self.actions = self.main_window.get_selection_actions()
36+
37+ def test_navigating_discards_selection(self):
38+ self.main_window.go_back()
39+ self.assert_selection_eventually_dismissed()

Subscribers

People subscribed via source and target branches

to status/vote changes: