Merge lp:~abreu-alexandre/webbrowser-app/webapp-url-dispatcher-failure into lp:webbrowser-app

Proposed by Alexandre Abreu on 2016-09-01
Status: Needs review
Proposed branch: lp:~abreu-alexandre/webbrowser-app/webapp-url-dispatcher-failure
Merge into: lp:webbrowser-app
Diff against target: 88 lines (+34/-7)
4 files modified
src/app/webcontainer/WebViewImplOxide.qml (+0/-3)
src/app/webcontainer/WebappContainerWebview.qml (+6/-0)
src/app/webcontainer/webapp-container.qml (+4/-4)
tests/autopilot/webapp_container/tests/test_app_launch.py (+24/-0)
To merge this branch: bzr merge lp:~abreu-alexandre/webbrowser-app/webapp-url-dispatcher-failure
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing on 2016-09-01
Ubuntu Phablet Team 2016-09-01 Pending
Review via email: mp+304666@code.launchpad.net

Commit message

Fix url-dispatcher url updates failures

Description of the change

Fix url-dispatcher url updates failures

To post a comment you must log in.

FAILED: Continuous integration, rev:1533
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/621/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1400/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1400
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1259
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1259
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1259
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1256/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1256/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1256/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1256/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1256/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1256/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1256/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1256
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1256/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1256/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-webbrowser-app-ci/621/rebuild

review: Needs Fixing (continuous-integration)

Unmerged revisions

1533. By Alexandre Abreu on 2016-09-01

Fix url-dispatcher url updates

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/webcontainer/WebViewImplOxide.qml'
--- src/app/webcontainer/WebViewImplOxide.qml 2016-07-13 16:23:18 +0000
+++ src/app/webcontainer/WebViewImplOxide.qml 2016-09-01 16:02:36 +0000
@@ -131,9 +131,6 @@
131 onMediaAccessPermissionRequested: PopupUtils.open(mediaAccessDialogComponent, null, { request: request })131 onMediaAccessPermissionRequested: PopupUtils.open(mediaAccessDialogComponent, null, { request: request })
132 }132 }
133133
134 StateSaver.properties: "url"
135 StateSaver.enabled: !runningLocalApplication
136
137 function handleSAMLRequestPattern(urlPattern) {134 function handleSAMLRequestPattern(urlPattern) {
138 webappUrlPatterns.push(urlPattern)135 webappUrlPatterns.push(urlPattern)
139136
140137
=== modified file 'src/app/webcontainer/WebappContainerWebview.qml'
--- src/app/webcontainer/WebappContainerWebview.qml 2016-07-13 16:23:18 +0000
+++ src/app/webcontainer/WebappContainerWebview.qml 2016-09-01 16:02:36 +0000
@@ -46,6 +46,12 @@
46 signal samlRequestUrlPatternReceived(string urlPattern)46 signal samlRequestUrlPatternReceived(string urlPattern)
47 signal themeColorMetaInformationDetected(string theme_color)47 signal themeColorMetaInformationDetected(string theme_color)
4848
49 onWebappNameChanged: {
50 if (webappContainerWebViewLoader.item) {
51 webappContainerWebViewLoader.item.webappName = webappName
52 }
53 }
54
49 onWideChanged: {55 onWideChanged: {
50 if (webappContainerWebViewLoader.item56 if (webappContainerWebViewLoader.item
51 && webappContainerWebViewLoader.item.wide !== undefined) {57 && webappContainerWebViewLoader.item.wide !== undefined) {
5258
=== modified file 'src/app/webcontainer/webapp-container.qml'
--- src/app/webcontainer/webapp-container.qml 2016-07-13 16:23:18 +0000
+++ src/app/webcontainer/webapp-container.qml 2016-09-01 16:02:36 +0000
@@ -227,6 +227,9 @@
227 onlineAccountsController.visible = true227 onlineAccountsController.visible = true
228 }228 }
229229
230 StateSaver.properties: "url"
231 StateSaver.enabled: !runningLocalApplication
232
230 function startBrowsing() {233 function startBrowsing() {
231 console.log("Start browsing")234 console.log("Start browsing")
232 // This will activate the UnityWebApp element used in WebApp.qml235 // This will activate the UnityWebApp element used in WebApp.qml
@@ -236,10 +239,7 @@
236 // it has not been set previously before setting the URL to the default property 239 // it has not been set previously before setting the URL to the default property
237 // homepage.240 // homepage.
238 var webView = webappViewLoader.item.currentWebview241 var webView = webappViewLoader.item.currentWebview
239 var current_url = webView.url.toString();242 webView.url = root.url
240 if (!current_url || current_url.length === 0) {
241 webView.url = root.url
242 }
243 showWebView()243 showWebView()
244 }244 }
245245
246246
=== modified file 'tests/autopilot/webapp_container/tests/test_app_launch.py'
--- tests/autopilot/webapp_container/tests/test_app_launch.py 2016-06-17 18:03:09 +0000
+++ tests/autopilot/webapp_container/tests/test_app_launch.py 2016-09-01 16:02:36 +0000
@@ -104,3 +104,27 @@
104 result = 'test'104 result = 'test'
105 self.assertThat(self.get_webcontainer_window().title,105 self.assertThat(self.get_webcontainer_window().title,
106 Eventually(Equals(result)))106 Eventually(Equals(result)))
107
108 self.assertThat(lambda: self.get_oxide_webview().webappName,
109 Eventually(Equals(result)))
110
111 def test_webapps_launch_with_external_url(self):
112 args = ["--webapp='dGVzdA=='", "http://www.test.com/test"]
113 rule = 'MAP *.test.com:80 ' + self.get_base_url_hostname()
114 with generate_temp_webapp() as webapp_install_path:
115 env_vars = {
116 'UBUNTU_WEBVIEW_HOST_MAPPING_RULES': rule,
117 'WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER': (
118 webapp_install_path)
119 }
120 self.launch_webcontainer_app(args, env_vars)
121 webview = self.get_oxide_webview()
122 webapp_url = 'http://www.test.com/test'
123 self.assertThat(webview.url, Eventually(Equals(webapp_url)))
124
125 result = 'test'
126 self.assertThat(self.get_webcontainer_window().title,
127 Eventually(Equals(result)))
128
129 self.assertThat(lambda: self.get_oxide_webview().webappName,
130 Eventually(Equals(result)))

Subscribers

People subscribed via source and target branches

to status/vote changes: