Closed Bug 1431456 Opened 6 years ago Closed 6 years ago

send tab to device url is truncated

Categories

(Firefox for Android Graveyard :: Android Sync, defect)

Firefox 59
Unspecified
Android
defect
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: rodrigozeh, Assigned: Grisha)

Details

Attachments

(3 files)

Attached image _20180118_135912.JPG
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171112125346

Steps to reproduce:

1. opened the url "http://t-melbourne:8080/correicaovirtual-1.0.0/f/login.xhtml" on Nightly for Android 
2. used the send tab option to Firefox on Windows 7 32bit desktop.





Actual results:

3. opened said Firefox on desktop and it loaded a tab with the url "login.xhtml"


Expected results:

4. It should have opened "http://t-melbourne:8080/correicaovirtual-1.0.0/f/login.xhtml"

The example url is a local page that will only work on my job intranet. Don't even bother trying to open it. I don't know if it's a valid url. Maybe it isn't and that's why Firefox can't properly send it across devices.
Confirmed that Android -> other device is broken as described in comment 0. Desktop -> Android functions correctly.
Status: UNCONFIRMED → NEW
Component: General → Android Sync
Ever confirmed: true
OS: Unspecified → Android
Switching to use an equivalent of Patterns.WEB_URL_WITH_PROTOCOL improves the situation. I'll take a closer look at a broader context to make sure this won't regress anything and put together a patch.
(In reply to :Grisha Kruglov from comment #3)
> Switching to use an equivalent of Patterns.WEB_URL_WITH_PROTOCOL improves
> the situation. I'll take a closer look at a broader context to make sure
> this won't regress anything and put together a patch.

The exact regexes in Patterns.* vary by Android version; I think, at one time, we had copied some version for consistency across devices.  Updating the regex is not a bad idea... but add this as a test, and then run the tests, since the regex regresses some behaviour every time it is bumped.
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Comment on attachment 8944549 [details]
Bug 1431456 - Pre: junit4-ify weburlfinder tests, add a few extra test cases

https://reviewboard.mozilla.org/r/214718/#review220378

Thank you, sir.

::: mobile/android/services/src/test/java/org/mozilla/gecko/sync/setup/activities/WebURLFinderTest.java:37
(Diff revision 1)
> +
> +    @Test
> +    public void testFullURL() {
> +        assertEquals("http://scheme.com:8080/inner#anchor&arg=1", find("test.com http://scheme.com:8080/inner#anchor&arg=1"));
> +        assertEquals("http://s-scheme.com:8080/inner#anchor&arg=1", find("test.com http://s-scheme.com:8080/inner#anchor&arg=1"));
> +        assertEquals("http://t-example:8080/appversion-1.0.0/f/action.xhtml", find("test.com http://t-example:8080/appversion-1.0.0/f/action.xhtml"));

This fails now, right?  I would have prefered the Pre: to convert, and the test added with the code that makes it pass, but not worth re-slicing the series.
Attachment #8944549 - Flags: review?(nalexander) → review+
Comment on attachment 8944550 [details]
Bug 1431456 - Bump url-matching regex patterns to their Android O counterparts

https://reviewboard.mozilla.org/r/214720/#review220380

If it's green for you, it's good for me.  Stamp!
Comment on attachment 8944550 [details]
Bug 1431456 - Bump url-matching regex patterns to their Android O counterparts

https://reviewboard.mozilla.org/r/214720/#review220382
Attachment #8944550 - Flags: review?(nalexander) → review+
(In reply to Nick Alexander :nalexander from comment #7)
> This fails now, right?

In more ways than one. IIRC some existing tests also failed once I ran them a few days ago with the old regex setup.
Pushed by gkruglov@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c354536fd7f1
Pre: junit4-ify weburlfinder tests, add a few extra test cases r=nalexander
https://hg.mozilla.org/integration/autoland/rev/e8e57700030a
Bump url-matching regex patterns to their Android O counterparts r=nalexander
https://hg.mozilla.org/mozilla-central/rev/c354536fd7f1
https://hg.mozilla.org/mozilla-central/rev/e8e57700030a
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: