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
=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml'
--- src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml 2014-03-27 12:01:14 +0000
+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebContext.qml 2014-04-07 21:19:50 +0000
@@ -19,7 +19,7 @@
19pragma Singleton19pragma Singleton
2020
21import QtQuick 2.021import QtQuick 2.0
22import com.canonical.Oxide 0.122import com.canonical.Oxide 1.0
2323
24Item {24Item {
25 property string customUA: userAgent.defaultUA25 property string customUA: userAgent.defaultUA
2626
=== modified file 'src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml'
--- src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml 2014-03-27 11:51:08 +0000
+++ src/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml 2014-04-07 21:19:50 +0000
@@ -18,7 +18,7 @@
1818
19import QtQuick 2.019import QtQuick 2.0
20import QtQuick.Window 2.020import QtQuick.Window 2.0
21import com.canonical.Oxide 0.121import com.canonical.Oxide 1.0
22import Ubuntu.Components 0.122import Ubuntu.Components 0.1
23import Ubuntu.Components.Popups 0.123import Ubuntu.Components.Popups 0.1
24import "."24import "."
2525
=== modified file 'src/Ubuntu/Components/Extras/Browser/UserAgent02.qml'
--- src/Ubuntu/Components/Extras/Browser/UserAgent02.qml 2014-03-24 12:32:52 +0000
+++ src/Ubuntu/Components/Extras/Browser/UserAgent02.qml 2014-04-07 21:19:50 +0000
@@ -33,12 +33,15 @@
33 // %3: optional hardware ID token (must start with a semi-colon if present)33 // %3: optional hardware ID token (must start with a semi-colon if present)
34 // %4: WebKit version, e.g. "537.36"34 // %4: WebKit version, e.g. "537.36"
35 // %5: Chromium version, e.g. "35.0.1870.2"35 // %5: Chromium version, e.g. "35.0.1870.2"
36 // %6: optional token to provide additional free-form information (must start with a whitespace), e.g. "Mobile"36 // %6: Optional token to provide additional free-form information (must end with a whitespace), e.g. "Mobile "
37 // %7: Safari version, e.g. "537.36"
38 // %8: Optional token, in case some extra bits are needed to make things work (e.g. an extra formfactor info etc.)
39 //
37 // note #1: "Mozilla/5.0" is misinformation, but it is a legacy token that40 // note #1: "Mozilla/5.0" is misinformation, but it is a legacy token that
38 // virtually every single UA out there has, it seems unwise to remove it41 // virtually every single UA out there has, it seems unwise to remove it
39 // note #2: "AppleWebKit", as opposed to plain "WebKit", does make a42 // note #2: "AppleWebKit", as opposed to plain "WebKit", does make a
40 // difference in the content served by certain sites (e.g. gmail.com)43 // difference in the content served by certain sites (e.g. gmail.com)
41 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"
4245
43 // FIXME: compute at build time (using lsb_release)46 // FIXME: compute at build time (using lsb_release)
44 readonly property string _ubuntuVersion: "14.04"47 readonly property string _ubuntuVersion: "14.04"
@@ -56,7 +59,9 @@
56 // every time we rebase on a newer chromium.59 // every time we rebase on a newer chromium.
57 readonly property string _chromiumVersion: "35.0.1870.2"60 readonly property string _chromiumVersion: "35.0.1870.2"
5861
59 readonly property string _more: (formFactor === "mobile") ? " Mobile" : ""62 readonly property string _formFactor: (formFactor === "mobile") ? "Mobile " : ""
6063
61 property string defaultUA: _template.arg(_ubuntuVersion).arg(_attributes).arg(_hardwareID).arg(_webkitVersion).arg(_chromiumVersion).arg(_more)64 readonly property string _more: ""
65
66 property string defaultUA: _template.arg(_ubuntuVersion).arg(_attributes).arg(_hardwareID).arg(_webkitVersion).arg(_chromiumVersion).arg(_formFactor).arg(_webkitVersion).arg(_more)
62}67}

Subscribers

People subscribed via source and target branches

to status/vote changes: