Merge lp:~osomon/webbrowser-app/hsbc-br-ua-override into lp:webbrowser-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Bill Filler
Approved revision: 763
Merged at revision: 768
Proposed branch: lp:~osomon/webbrowser-app/hsbc-br-ua-override
Merge into: lp:webbrowser-app
Diff against target: 26 lines (+4/-2)
2 files modified
src/Ubuntu/Web/ua-override-worker.js (+2/-2)
src/Ubuntu/Web/ua-overrides-mobile.js (+2/-0)
To merge this branch: bzr merge lp:~osomon/webbrowser-app/hsbc-br-ua-override
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+238270@code.launchpad.net

Commit message

Fix the override mechanism for navigator.userAgent,
and add UA override rules for HSBC’s Brazilian mobile site and ESPN’s mobile site.

To post a comment you must log in.
763. By Olivier Tilloy

Add a UA override rule for ESPN’s mobile site.

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:763
http://jenkins.qa.ubuntu.com/job/webbrowser-app-ci/1190/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/5914/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/4073
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-amd64-ci/389
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/389
        deb: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-armhf-ci/389/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/webbrowser-app-utopic-i386-ci/389
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/5557/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/7166
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/7166/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/14644
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/3437
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/4402
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/4402/artifact/work/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Web/ua-override-worker.js'
2--- src/Ubuntu/Web/ua-override-worker.js 2014-05-29 15:30:11 +0000
3+++ src/Ubuntu/Web/ua-override-worker.js 2014-10-14 11:13:19 +0000
4@@ -42,9 +42,9 @@
5 }
6 }
7
8-exports.onGetUserAgentOverride = function(data) {
9+exports.onGetUserAgentOverride = function(event) {
10 var override = getUAoverride(event.url);
11 if (override !== null) {
12- data.userAgentOverride = override;
13+ event.userAgentOverride = override;
14 }
15 }
16
17=== modified file 'src/Ubuntu/Web/ua-overrides-mobile.js'
18--- src/Ubuntu/Web/ua-overrides-mobile.js 2014-07-03 10:33:57 +0000
19+++ src/Ubuntu/Web/ua-overrides-mobile.js 2014-10-14 11:13:19 +0000
20@@ -22,4 +22,6 @@
21 [/^https?:\/\/mail\.google\.com\//, "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4) AppleWebKit/537.36 Chromium/35.0.1870.2 Mobile Safari"],
22 [/^https?:\/\/m\.youtube\.com\//, "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4;) AppleWebKit/537.36 Chromium/35.0.1870.2 Mobile Safari/537.36"], // http://pad.lv/1228415
23 [/^http:\/\/chrome\.angrybirds\.com\//, "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4;) AppleWebKit/537.36 Chrome/35.0.1870.2 Mobile Safari/537.36"], // http://pad.lv/1284158
24+ [/^https?:\/\/(\w+\.)*hsbc\.com\.br\//, "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4;) AppleWebKit/537.36 Chrome/35.0.1870.2 Mobile Safari/537.36"], // http://pad.lv/1380657
25+ [/^http:\/\/(\w+\.)*espn\.(go\.)?com\//, "Mozilla/5.0 (Linux; Ubuntu 14.04 like Android 4.4;) AppleWebKit/537.36 Chrome/35.0.1870.2 Mobile Safari/537.36"], // http://pad.lv/1316259
26 ];

Subscribers

People subscribed via source and target branches

to status/vote changes: