Merge lp:~osomon/webbrowser-app/dont-reset-addressbar-when-loading into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Olivier Tilloy
Approved revision: 668
Merged at revision: 674
Proposed branch: lp:~osomon/webbrowser-app/dont-reset-addressbar-when-loading
Merge into: lp:webbrowser-app
Diff against target: 62 lines (+27/-5)
3 files modified
src/app/webbrowser/AddressBar.qml (+1/-1)
src/app/webbrowser/Chrome.qml (+6/-4)
tests/autopilot/webbrowser_app/tests/test_addressbar_states.py (+20/-0)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/dont-reset-addressbar-when-loading
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+230724@code.launchpad.net

Commit message

Do not reset the contents of the address bar to the previous URL if currently loading.

Unfocus the address bar when requesting the page to reload.

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 :

FAILED: Continuous integration, rev:668
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/1030/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3526
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2772/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-amd64-ci/229
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/229
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/229/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-i386-ci/229
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3420
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4773
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4773/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11447
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2244/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3051
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3051/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/webbrowser-app-ci/1030/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:668
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/1039/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/3697
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2857/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-amd64-ci/238
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/238
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/238/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-i386-ci/238
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/3578
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4944
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4944/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/11662
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/2319/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3141
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/3141/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/webbrowser-app-ci/1039/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/webbrowser/AddressBar.qml'
--- src/app/webbrowser/AddressBar.qml 2014-07-30 07:55:55 +0000
+++ src/app/webbrowser/AddressBar.qml 2014-08-13 22:06:27 +0000
@@ -172,7 +172,7 @@
172 }172 }
173 onActiveFocusChanged: {173 onActiveFocusChanged: {
174 if (!activeFocus) {174 if (!activeFocus) {
175 if (addressbar.actualUrl.toString()) {175 if (!addressbar.loading && addressbar.actualUrl.toString()) {
176 text = addressbar.actualUrl176 text = addressbar.actualUrl
177 }177 }
178 }178 }
179179
=== modified file 'src/app/webbrowser/Chrome.qml'
--- src/app/webbrowser/Chrome.qml 2014-07-30 10:37:20 +0000
+++ src/app/webbrowser/Chrome.qml 2014-08-13 22:06:27 +0000
@@ -98,11 +98,13 @@
98 // Workaround for https://bugs.launchpad.net/oxide/+bug/1290821.98 // Workaround for https://bugs.launchpad.net/oxide/+bug/1290821.
99 && !chrome.webview.lastLoadStopped99 && !chrome.webview.lastLoadStopped
100 : false100 : false
101 onLoadingChanged: {
102 if (loading) {
103 chrome.webview.forceActiveFocus()
104 }
105 }
101106
102 onValidated: {107 onValidated: chrome.webview.url = requestedUrl
103 chrome.webview.url = requestedUrl
104 chrome.webview.forceActiveFocus()
105 }
106 onRequestReload: chrome.webview.reload()108 onRequestReload: chrome.webview.reload()
107 onRequestStop: chrome.webview.stop()109 onRequestStop: chrome.webview.stop()
108110
109111
=== modified file 'tests/autopilot/webbrowser_app/tests/test_addressbar_states.py'
--- tests/autopilot/webbrowser_app/tests/test_addressbar_states.py 2014-07-16 10:47:40 +0000
+++ tests/autopilot/webbrowser_app/tests/test_addressbar_states.py 2014-08-13 22:06:27 +0000
@@ -57,3 +57,23 @@
57 webview = self.main_window.get_current_webview()57 webview = self.main_window.get_current_webview()
58 self.pointing_device.click_object(webview)58 self.pointing_device.click_object(webview)
59 self.assertThat(address_bar.text, Eventually(Equals(self.url)))59 self.assertThat(address_bar.text, Eventually(Equals(self.url)))
60
61 def test_looses_focus_when_loading_starts(self):
62 address_bar = self.main_window.get_chrome().get_address_bar()
63 self.pointing_device.click_object(address_bar)
64 self.assertThat(address_bar.activeFocus, Eventually(Equals(True)))
65 self.assertThat(address_bar.state, Eventually(Equals("editing")))
66 url = self.base_url + "/aleaiactaest"
67 self.go_to_url(url)
68 self.assertThat(address_bar.state, Eventually(Equals("")))
69 self.assertThat(address_bar.activeFocus, Eventually(Equals(False)))
70
71 def test_looses_focus_when_reloading(self):
72 address_bar = self.main_window.get_chrome().get_address_bar()
73 self.pointing_device.click_object(address_bar)
74 self.assertThat(address_bar.activeFocus, Eventually(Equals(True)))
75 self.assertThat(address_bar.state, Eventually(Equals("editing")))
76 action_button = address_bar.get_action_button()
77 self.pointing_device.click_object(action_button)
78 self.assertThat(address_bar.state, Eventually(Equals("")))
79 self.assertThat(address_bar.activeFocus, Eventually(Equals(False)))

Subscribers

People subscribed via source and target branches

to status/vote changes: