Merge lp:~abreu-alexandre/webbrowser-app/add-safari-to-default-ua into lp:webbrowser-app

Proposed by Alexandre Abreu
Status: Rejected
Rejected by: Olivier Tilloy
Proposed branch: lp:~abreu-alexandre/webbrowser-app/add-safari-to-default-ua
Merge into: lp:webbrowser-app
Diff against target: 60 lines (+12/-7)
3 files modified
src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml (+1/-1)
src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml (+1/-1)
src/Ubuntu/Components/Extras/Browser/UserAgent02.qml (+10/-5)
To merge this branch: bzr merge lp:~abreu-alexandre/webbrowser-app/add-safari-to-default-ua
Reviewer Review Type Date Requested Status
Olivier Tilloy Disapprove
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+214361@code.launchpad.net

Commit message

Add 'Safari/<version>' to the default UA string.

This is mostly useful for google webapps on the desktop. Using Oxide, quite a few of them (somewhat violently) warn the user that the current browser is not supported before allowing one to be redirected to the main website.

After some experimentation, simply adding a mention of Safari to the UA string removes the issues.

I tested the default webapps on Touch and I didn't notice anything specific

Description of the change

Add 'Safari/<version>' to the default UA string.

This is mostly useful for google webapps on the desktop. Using Oxide, quite a few of them (somewhat violently) warn the user that the current browser is not supported before allowing one to be redirected to the main website.

After some experimentation, simply adding a mention of Safari to the US string removes the issues.

I tested the default webapps on Touch and I didn't notice anything specific that indicates a regression.

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

FAILED: Continuous integration, rev:482
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/696/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4537
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4096/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-amd64-ci/198
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-armhf-ci/198
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-armhf-ci/198/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-i386-ci/198
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3919
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4649
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4649/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4142
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4142/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6340/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5647

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

review: Needs Fixing (continuous-integration)
483. By Alexandre Abreu

updates

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

update docs

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

Oxide 1.0

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:485
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/705/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4584
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4105/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-amd64-ci/207
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-armhf-ci/207
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-armhf-ci/207/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-trusty-i386-ci/207
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3950
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4702
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4702/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4180
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4180/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6341/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5710

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Olivier Tilloy (osomon) wrote :

This looks good to me.

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

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml'
2--- src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml 2014-03-27 12:01:14 +0000
3+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml 2014-04-07 21:19:50 +0000
4@@ -19,7 +19,7 @@
5 pragma Singleton
6
7 import QtQuick 2.0
8-import com.canonical.Oxide 0.1
9+import com.canonical.Oxide 1.0
10
11 Item {
12 property string customUA: userAgent.defaultUA
13
14=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml'
15--- src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml 2014-03-27 11:51:08 +0000
16+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml 2014-04-07 21:19:50 +0000
17@@ -18,7 +18,7 @@
18
19 import QtQuick 2.0
20 import QtQuick.Window 2.0
21-import com.canonical.Oxide 0.1
22+import com.canonical.Oxide 1.0
23 import Ubuntu.Components 0.1
24 import Ubuntu.Components.Popups 0.1
25 import "."
26
27=== modified file 'src/Ubuntu/Components/Extras/Browser/UserAgent02.qml'
28--- src/Ubuntu/Components/Extras/Browser/UserAgent02.qml 2014-03-24 12:32:52 +0000
29+++ src/Ubuntu/Components/Extras/Browser/UserAgent02.qml 2014-04-07 21:19:50 +0000
30@@ -33,12 +33,15 @@
31 // %3: optional hardware ID token (must start with a semi-colon if present)
32 // %4: WebKit version, e.g. "537.36"
33 // %5: Chromium version, e.g. "35.0.1870.2"
34- // %6: optional token to provide additional free-form information (must start with a whitespace), e.g. "Mobile"
35+ // %6: Optional token to provide additional free-form information (must end with a whitespace), e.g. "Mobile "
36+ // %7: Safari version, e.g. "537.36"
37+ // %8: Optional token, in case some extra bits are needed to make things work (e.g. an extra formfactor info etc.)
38+ //
39 // note #1: "Mozilla/5.0" is misinformation, but it is a legacy token that
40 // virtually every single UA out there has, it seems unwise to remove it
41 // note #2: "AppleWebKit", as opposed to plain "WebKit", does make a
42 // difference in the content served by certain sites (e.g. gmail.com)
43- readonly property string _template: "Mozilla/5.0 (Linux; Ubuntu %1%2%3) AppleWebKit/%4 Chromium/%5%6"
44+ readonly property string _template: "Mozilla/5.0 (Linux; Ubuntu %1%2%3) AppleWebKit/%4 Chromium/%5 %6Safari/%7%8"
45
46 // FIXME: compute at build time (using lsb_release)
47 readonly property string _ubuntuVersion: "14.04"
48@@ -56,7 +59,9 @@
49 // every time we rebase on a newer chromium.
50 readonly property string _chromiumVersion: "35.0.1870.2"
51
52- readonly property string _more: (formFactor === "mobile") ? " Mobile" : ""
53-
54- property string defaultUA: _template.arg(_ubuntuVersion).arg(_attributes).arg(_hardwareID).arg(_webkitVersion).arg(_chromiumVersion).arg(_more)
55+ readonly property string _formFactor: (formFactor === "mobile") ? "Mobile " : ""
56+
57+ readonly property string _more: ""
58+
59+ property string defaultUA: _template.arg(_ubuntuVersion).arg(_attributes).arg(_hardwareID).arg(_webkitVersion).arg(_chromiumVersion).arg(_formFactor).arg(_webkitVersion).arg(_more)
60 }

Subscribers

People subscribed via source and target branches

to status/vote changes: