Closed Bug 965291 Opened 6 years ago Closed 4 years ago
Change capability platform
Name to return -moz-firefoxos on B2G
The platformName capability returns "Android" which (if upper-cased) is an allowed platform name according to the WebDriver spec. However it does not give the client any possibility of determining if the OS is Firefox OS. Until "FIREFOXOS" is a standardized platform name the specification suggests using "-MOZ-FIREFOXOS" (without the leading dash prefix) to identify the platform. (Bug 965283 suggests changing System.appinfo.OS from returning "Android" to "B2G" (unbranded Gaia) or "Firefox OS", but it's not a strict dependency for a fix for this bug.)
For B2G, this is currently used to determine we are running on a device/emulator as opposed to desktop simulator: https://github.com/mozilla-b2g/gaia/blob/994bf56beaa04bb63a5a0448a0a82ac93f399502/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#L704 A change would affect gaiatest and potentially any packages that depend on it.
This feels like nsIXULRuntime should return the right thing here instead of us playing around with the checking if we are on B2G and ignoring what nsIXULRuntime tells us
(In reply to Dave Hunt (:davehunt) [Unavailable until at least 10th February] from comment #2) > For B2G, this is currently used to determine we are running on a > device/emulator as opposed to desktop simulator: Determining the device seems like it can be done through the "device" capability, which would make a more a natural fit. Can we change gaia_test.py to use that? By packages depending on it, do they need to be changed too or will they inherit from the change in that file? (In reply to David Burns :automatedtester from comment #3) > This feels like nsIXULRuntime should return the right thing here > instead of us playing around with the checking if we are on B2G and > ignoring what nsIXULRuntime tells us I filed bug 965283 about that. This would be a temporary fix for making Marionette spec compatible. As bsmedberg commented in that bug, it might not be as straight forward as just changing it so we need to spend some time evaluating the risks involved.
> Can we change gaia_test.py to use that? By packages depending on it, > do they need to be changed too or will they inherit from the change in > that file? Yes, we can change gaia_test.py to use that. Dependent packages would inherit from the change in that file, but we'll probably need to notify people that they need to pick up a new version of gaiatest, since some consumers are pegged to older versions, and it's hard to say how much work we may be requiring of them to force them to update; it probably depends on how old a version of gaiatest they're using. Also, we can't synchronize changes to gecko and gaia exactly, especially not across multiple branches, so landing this change would likely cause some bustage for a few hours while the change is propagated between repos and among branches. This is something we may want to do, but we have to communicate it carefully. It would be painful, but possibly worthwhile, to introduce an intermediate state, like temporarily adding a platformEx field, so we could land a series of changes to gecko and gaia such that we're never in a broken state.
According to the spec the value should be "-moz-firefoxos". I'm not sure what constitutes “elevation” to the recognized list of platforms in the spec, since "android" is already there. This bug also relates to bug 965308 and can probably be done in conjunction with that.
Summary: Change capability platformName to return MOZ-FIREFOXOS on B2G → Change capability platformName to return -moz-firefoxos on B2G
Related, I submitted https://github.com/w3c/webdriver/pull/33 to the WebDriver specification adding "firefoxos" to the list of standardised operating systems.
This pull request was closed because there is going to be a removal of the platform names from the specification as it hampers the future proofing of adding new platforms and browser names
AIUI we should now send something “which makes sense”. What makes sense to send for Firefox OS?
so I have been trying to think of the best way to do this so that it is future proof. Currently Selendroid/iOSDriver return the platform and then they return the app name. Not sure if this is something that we want to do (at a spec level) since they have the ability to get an app started as a capability (which could be useful and then allow us to return the app name easier.
The spec no longer mandates that it should return a certain prefixed string.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.