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
1=== modified file 'src/app/webbrowser/AddressBar.qml'
2--- src/app/webbrowser/AddressBar.qml 2014-07-30 07:55:55 +0000
3+++ src/app/webbrowser/AddressBar.qml 2014-08-13 22:06:27 +0000
4@@ -172,7 +172,7 @@
5 }
6 onActiveFocusChanged: {
7 if (!activeFocus) {
8- if (addressbar.actualUrl.toString()) {
9+ if (!addressbar.loading && addressbar.actualUrl.toString()) {
10 text = addressbar.actualUrl
11 }
12 }
13
14=== modified file 'src/app/webbrowser/Chrome.qml'
15--- src/app/webbrowser/Chrome.qml 2014-07-30 10:37:20 +0000
16+++ src/app/webbrowser/Chrome.qml 2014-08-13 22:06:27 +0000
17@@ -98,11 +98,13 @@
18 // Workaround for https://bugs.launchpad.net/oxide/+bug/1290821.
19 && !chrome.webview.lastLoadStopped
20 : false
21+ onLoadingChanged: {
22+ if (loading) {
23+ chrome.webview.forceActiveFocus()
24+ }
25+ }
26
27- onValidated: {
28- chrome.webview.url = requestedUrl
29- chrome.webview.forceActiveFocus()
30- }
31+ onValidated: chrome.webview.url = requestedUrl
32 onRequestReload: chrome.webview.reload()
33 onRequestStop: chrome.webview.stop()
34
35
36=== modified file 'tests/autopilot/webbrowser_app/tests/test_addressbar_states.py'
37--- tests/autopilot/webbrowser_app/tests/test_addressbar_states.py 2014-07-16 10:47:40 +0000
38+++ tests/autopilot/webbrowser_app/tests/test_addressbar_states.py 2014-08-13 22:06:27 +0000
39@@ -57,3 +57,23 @@
40 webview = self.main_window.get_current_webview()
41 self.pointing_device.click_object(webview)
42 self.assertThat(address_bar.text, Eventually(Equals(self.url)))
43+
44+ def test_looses_focus_when_loading_starts(self):
45+ address_bar = self.main_window.get_chrome().get_address_bar()
46+ self.pointing_device.click_object(address_bar)
47+ self.assertThat(address_bar.activeFocus, Eventually(Equals(True)))
48+ self.assertThat(address_bar.state, Eventually(Equals("editing")))
49+ url = self.base_url + "/aleaiactaest"
50+ self.go_to_url(url)
51+ self.assertThat(address_bar.state, Eventually(Equals("")))
52+ self.assertThat(address_bar.activeFocus, Eventually(Equals(False)))
53+
54+ def test_looses_focus_when_reloading(self):
55+ address_bar = self.main_window.get_chrome().get_address_bar()
56+ self.pointing_device.click_object(address_bar)
57+ self.assertThat(address_bar.activeFocus, Eventually(Equals(True)))
58+ self.assertThat(address_bar.state, Eventually(Equals("editing")))
59+ action_button = address_bar.get_action_button()
60+ self.pointing_device.click_object(action_button)
61+ self.assertThat(address_bar.state, Eventually(Equals("")))
62+ self.assertThat(address_bar.activeFocus, Eventually(Equals(False)))

Subscribers

People subscribed via source and target branches

to status/vote changes: