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

Proposed by Alexandre Abreu
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
Ubuntu Phablet Team 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.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

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

Fix url-dispatcher url updates

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/webcontainer/WebViewImplOxide.qml'
2--- src/app/webcontainer/WebViewImplOxide.qml 2016-07-13 16:23:18 +0000
3+++ src/app/webcontainer/WebViewImplOxide.qml 2016-09-01 16:02:36 +0000
4@@ -131,9 +131,6 @@
5 onMediaAccessPermissionRequested: PopupUtils.open(mediaAccessDialogComponent, null, { request: request })
6 }
7
8- StateSaver.properties: "url"
9- StateSaver.enabled: !runningLocalApplication
10-
11 function handleSAMLRequestPattern(urlPattern) {
12 webappUrlPatterns.push(urlPattern)
13
14
15=== modified file 'src/app/webcontainer/WebappContainerWebview.qml'
16--- src/app/webcontainer/WebappContainerWebview.qml 2016-07-13 16:23:18 +0000
17+++ src/app/webcontainer/WebappContainerWebview.qml 2016-09-01 16:02:36 +0000
18@@ -46,6 +46,12 @@
19 signal samlRequestUrlPatternReceived(string urlPattern)
20 signal themeColorMetaInformationDetected(string theme_color)
21
22+ onWebappNameChanged: {
23+ if (webappContainerWebViewLoader.item) {
24+ webappContainerWebViewLoader.item.webappName = webappName
25+ }
26+ }
27+
28 onWideChanged: {
29 if (webappContainerWebViewLoader.item
30 && webappContainerWebViewLoader.item.wide !== undefined) {
31
32=== modified file 'src/app/webcontainer/webapp-container.qml'
33--- src/app/webcontainer/webapp-container.qml 2016-07-13 16:23:18 +0000
34+++ src/app/webcontainer/webapp-container.qml 2016-09-01 16:02:36 +0000
35@@ -227,6 +227,9 @@
36 onlineAccountsController.visible = true
37 }
38
39+ StateSaver.properties: "url"
40+ StateSaver.enabled: !runningLocalApplication
41+
42 function startBrowsing() {
43 console.log("Start browsing")
44 // This will activate the UnityWebApp element used in WebApp.qml
45@@ -236,10 +239,7 @@
46 // it has not been set previously before setting the URL to the default property
47 // homepage.
48 var webView = webappViewLoader.item.currentWebview
49- var current_url = webView.url.toString();
50- if (!current_url || current_url.length === 0) {
51- webView.url = root.url
52- }
53+ webView.url = root.url
54 showWebView()
55 }
56
57
58=== modified file 'tests/autopilot/webapp_container/tests/test_app_launch.py'
59--- tests/autopilot/webapp_container/tests/test_app_launch.py 2016-06-17 18:03:09 +0000
60+++ tests/autopilot/webapp_container/tests/test_app_launch.py 2016-09-01 16:02:36 +0000
61@@ -104,3 +104,27 @@
62 result = 'test'
63 self.assertThat(self.get_webcontainer_window().title,
64 Eventually(Equals(result)))
65+
66+ self.assertThat(lambda: self.get_oxide_webview().webappName,
67+ Eventually(Equals(result)))
68+
69+ def test_webapps_launch_with_external_url(self):
70+ args = ["--webapp='dGVzdA=='", "http://www.test.com/test"]
71+ rule = 'MAP *.test.com:80 ' + self.get_base_url_hostname()
72+ with generate_temp_webapp() as webapp_install_path:
73+ env_vars = {
74+ 'UBUNTU_WEBVIEW_HOST_MAPPING_RULES': rule,
75+ 'WEBAPP_QML_DEFAULT_WEBAPPS_INSTALL_FOLDER': (
76+ webapp_install_path)
77+ }
78+ self.launch_webcontainer_app(args, env_vars)
79+ webview = self.get_oxide_webview()
80+ webapp_url = 'http://www.test.com/test'
81+ self.assertThat(webview.url, Eventually(Equals(webapp_url)))
82+
83+ result = 'test'
84+ self.assertThat(self.get_webcontainer_window().title,
85+ Eventually(Equals(result)))
86+
87+ self.assertThat(lambda: self.get_oxide_webview().webappName,
88+ Eventually(Equals(result)))

Subscribers

People subscribed via source and target branches

to status/vote changes: