Enable test_interfaces.html on B2G

RESOLVED FIXED in mozilla26

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: emk, Assigned: emk)

Tracking

unspecified
mozilla26
ARM
Gonk (Firefox OS)
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Attachment #797912 - Flags: review?(bugs) → review+
(Assignee)

Comment 1

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b04073aaa278
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Flags: in-testsuite+
(Assignee)

Comment 3

5 years ago
Hm, Android doesn't contain "Mobile" in the user-agent string?
(Assignee)

Comment 4

5 years ago
Created attachment 798162 [details] [diff] [review]
patch v2

Android 4.0 Panda is using "Tablet" in the UA token.
Either "Tablet" or "Mobile" will always be defined on Android and B2G:
https://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpHandler.cpp?rev=9d925d047ba5#683
Try result:
https://tbpl.mozilla.org/?tree=Try&rev=23413bdab693
Attachment #797912 - Attachment is obsolete: true
Attachment #798162 - Flags: review?(bugs)
Comment on attachment 798162 [details] [diff] [review]
patch v2

Review of attachment 798162 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/tests/mochitest/general/test_interfaces.html
@@ +602,5 @@
>  function createInterfaceMap(isXBLScope) {
>    var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
>    var isNightly = version.endsWith("a1");
>    var isRelease = !version.contains("a");
> +  info(navigator.userAgent);

I assume you'll drop this before landing.

@@ +629,1 @@
>        interfaceMap[entry.name] = true;

Could this be written as 

interfaceMap[entry] =
  typeof(entry) === "string" ||
  (entry.xbl === isXBLScope &&
   entry.desktop === isDesktop &&
   entry.release === isRelease);

or something like that?
(Assignee)

Comment 6

5 years ago
(In reply to :Ms2ger from comment #5)
> ::: dom/tests/mochitest/general/test_interfaces.html
> @@ +602,5 @@
> >  function createInterfaceMap(isXBLScope) {
> >    var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
> >    var isNightly = version.endsWith("a1");
> >    var isRelease = !version.contains("a");
> > +  info(navigator.userAgent);
> 
> I assume you'll drop this before landing.

Sure.

> @@ +629,1 @@
> >        interfaceMap[entry.name] = true;
> 
> Could this be written as 
> 
> interfaceMap[entry] =
>   typeof(entry) === "string" ||
>   (entry.xbl === isXBLScope &&
>    entry.desktop === isDesktop &&
>    entry.release === isRelease);
> 
> or something like that?

No. De Morgan's laws don't hold here because both |undefined === true| and |undefined === false| will be evaluated to false. (I admit this code is a bit tricky.)
Attachment #798162 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/aef6bbfe9db3
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.