Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

The Android icon looks weird #306

Closed
mgol opened this issue Jul 16, 2015 · 9 comments
Closed

The Android icon looks weird #306

mgol opened this issue Jul 16, 2015 · 9 comments
Assignees
Milestone

Comments

@mgol
Copy link
Member

mgol commented Jul 16, 2015

Open http://swarm.jquery.org/project/jqueryperiodic. The Android icon is as follows:
screen shot 2015-07-16 at 19 56 51
instead of just:
the robot icon
The actual icon is actually two ones - the first is:
browser-unknown
and, set as a background for the ::after pseudo-element is the Android icon. This is set as

testswarm/css/testswarm.css

Lines 476 to 478 in ba50f43

.swarm-os-android::after {
background-image: url(../img/os-android.png);
}

It seems to me that the browser is not recognized so the image is just "an unknown browser under Android"; is that true? For Android <4.4 the Android browser should just have its own icon. For >=4.4 the Chrome icon could appear as that's what we're testing here. But a regular robot icon would still be fine, I guess since BrowserStack presents it just as an Android 4.4/5.0 Browser and not as Chrome.

@Krinkle
Copy link
Member

Krinkle commented Jul 16, 2015

This is because the swarm.jquery.org configuration uses a user-agent match that only looks for the OS family, not any particular browser.

I've added icons for the Android and Chrome Mobile browsers. They will be used on the home page once we update our configuration to specify the "Android" and "Chrome Mobile" browserFamily accordingly.

@Krinkle
Copy link
Member

Krinkle commented Jul 16, 2015

Hm.. it may not be that simple. It's not browser "Android" for Android 2.3 and browser "Chrome Mobile" for Android 4 and higher.

Using http://swarm.jquery.org/job/929 as example, we see the following user agents / ua-parser data:

@mgol
Copy link
Member Author

mgol commented Jul 17, 2015

The Chrome icon should be fine, I guess, if only we see info about the Android version in TestSwarm as well.

BTW, this should only concern Android 4.4 or newer, Android 4.0-4.3 uses the default Android Browser that was removed in 4.4.

I have doubts if it makes sense to test Android versions for Android >= 5.0 since they just use Chrome Mobile and that matters, not the Android version used. Unfortunately, that's what we currently get from BrowserStack. Android 4.4 is an odd one since it has Chrome as a default browser but it's WebView has a frozen Chromium version. In Android 5.0+ both auto-update.

@Krinkle
Copy link
Member

Krinkle commented Jul 17, 2015

There's another problem I forgot about. The BrowserStack API doesn't provide browser property for mobile devices. Adding a browserFamily to these would mean the tests no longer get run.

I've reverted the jquery/infrastructure patch that added it for Android 2.3 because it was building up a backlog of unrun runs.

@mgol
Copy link
Member Author

mgol commented Jul 17, 2015

The Browserstack API has a browser field for mobile browsers; for the Android one it's "Android Browser". OTH, it returns "Android Browser" even for Android >= 4.4 which seems incorrect.

@Krinkle
Copy link
Member

Krinkle commented Jul 17, 2015

Aha, so we can use it but will need a mapping in testswarm-browserstack since ua-parser calls it browserFamily="Android" and BrowserStack uses browser="Android Browser".

Krinkle added a commit to jquery/testswarm-browserstack that referenced this issue Jul 17, 2015
Android's browser is "Android" in ua-parser and "Android Browser" in browserstack.
Yandex's browser is "Yandex Browser" in ua-parser and "Yandex" in  browserstack.

Yay for consistency.

Ref jquery/testswarm#306.
@Krinkle
Copy link
Member

Krinkle commented Jul 17, 2015

So... adding that mapping didn't work. testswarm-browserstack is still unable to map the browser.

This is because testswarm-browserstack explicitly ignores the browser.browser property from BrowserStack (see testswarm-browserstack.js#L323-L330) due to an inconsistency in the API between /workers and /browsers.

/browsers lists browser: "Android Browser", but /worker doesn't accept that property.

@Krinkle Krinkle added the bug label Oct 30, 2015
Krinkle added a commit to jquery/testswarm-browserstack that referenced this issue Mar 23, 2017
The bug where the index at /browsers includes a 'browser' for mobile devices
but /workers only supports spawning by 'device' was fixed in v4.

Follows-up 846a55e (#43), 075132c (#41).

Ref jquery/testswarm#306
@Krinkle Krinkle self-assigned this Mar 23, 2017
@Krinkle Krinkle added this to the 1.1.0 milestone Mar 23, 2017
@Krinkle
Copy link
Member

Krinkle commented Mar 23, 2017

This is now fixed.

screen shot 2017-03-22 at 19 13 48

screen shot 2017-03-22 at 19 13 55

screen shot 2017-03-22 at 19 13 31

@Krinkle Krinkle closed this as completed Mar 23, 2017
@Krinkle
Copy link
Member

Krinkle commented Mar 30, 2017

Krinkle added a commit to jquery/testswarm-browserstack that referenced this issue Mar 30, 2017
Generalisation of f246bb8. We'd have to map "Chrome" to "Android Browser"
as well to make it work fully, which is not practical.

Ref jquery/testswarm#306.
Krinkle added a commit that referenced this issue Mar 30, 2017
ua-parser should probably do this on their side, but at the moment
it parses out as browserFamily=Chrome if the User-Agent doesn't specify
"Mobile" after the Chrome version number.

Some emulators and tablets exhibit this ua-pattern variation.
Instead of requiring localSettings to specify which one is desired,
allow both.

Ref #306
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants