Closed
Bug 911243
Opened 12 years ago
Closed 12 years ago
Enable test_interfaces.html on B2G
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(1 file, 1 obsolete file)
|
10.52 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Attachment #797912 -
Flags: review?(bugs)
Updated•12 years ago
|
Attachment #797912 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Flags: in-testsuite+
Comment 2•12 years ago
|
||
| Assignee | ||
Comment 3•12 years ago
|
||
Hm, Android doesn't contain "Mobile" in the user-agent string?
| Assignee | ||
Comment 4•12 years ago
|
||
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 5•12 years ago
|
||
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•12 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.)
Updated•12 years ago
|
Attachment #798162 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•