Android reftests should force layout.css.devPixelsPerPx to 1.0

RESOLVED FIXED in mozilla28

Status

()

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

Trunk
mozilla28
ARM
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Currently, Android reftests run using the default value of layout.css.devPixelsPerPx, which means on many devices (like my Nexus S) we'll be running with a device-pixels-per-px ratio greater than 1.0. This can force content to be scaled, which messes with the pixel-perfection required by reftests, and also means you get different results on these devices from what you'd get on try (which defaults to 1.0). So I suggest we force the ratio to 1.0 to avoid these problems.
Comment on attachment 831769 [details] [diff] [review]
fix

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

This seems like an excellent idea.

Are you sure that devPixelsPerPx is 1.0 on the tegras?

We are also very near to turning on reftests on the pandas ("Android 4.0 Opt" on tbpl). Is there an easy way to check the default devPixelsPerPx on pandas?

::: layout/tools/reftest/remotereftest.py
@@ +367,5 @@
>          prefs["extensions.getAddons.search.browseURL"] = "http://127.0.0.1:8888/extensions-dummy/repositoryBrowseURL"
>          prefs["extensions.getAddons.search.url"] = "http://127.0.0.1:8888/extensions-dummy/repositorySearchURL"
>          # Make sure that opening the plugins check page won't hit the network
>          prefs["plugins.update.url"] = "http://127.0.0.1:8888/plugins-dummy/updateCheckURL"
> +        prefs["layout.css.devPixelsPerPx"] = "1.0";

The semi-colon at the end of the line here is not needed and rather un-pythony. Let's remove it.
Attachment #831769 - Flags: review?(gbrown) → review+
(In reply to Geoff Brown [:gbrown] from comment #2)
> Are you sure that devPixelsPerPx is 1.0 on the tegras?

I'm pretty sure.

> We are also very near to turning on reftests on the pandas ("Android 4.0
> Opt" on tbpl). Is there an easy way to check the default devPixelsPerPx on
> pandas?

Compare the screen height reported by "REFTEST INFO ... window size = ", which is in CSS pixels, to what you know of the actual screen size in device pixels.

> ::: layout/tools/reftest/remotereftest.py
> @@ +367,5 @@
> >          prefs["extensions.getAddons.search.browseURL"] = "http://127.0.0.1:8888/extensions-dummy/repositoryBrowseURL"
> >          prefs["extensions.getAddons.search.url"] = "http://127.0.0.1:8888/extensions-dummy/repositorySearchURL"
> >          # Make sure that opening the plugins check page won't hit the network
> >          prefs["plugins.update.url"] = "http://127.0.0.1:8888/plugins-dummy/updateCheckURL"
> > +        prefs["layout.css.devPixelsPerPx"] = "1.0";
> 
> The semi-colon at the end of the line here is not needed and rather
> un-pythony. Let's remove it.

Sure.
For tegras, I see:

REFTEST INFO | drawWindow flags = DRAWWINDOW_DRAW_CARET | DRAWWINDOW_DRAW_VIEW | DRAWWINDOW_USE_WIDGET_LAYERS; window size = 1024,743; test browser size = 800,1000

'screen': ['X:1024 Y:768']


For pandas, I see:

REFTEST INFO | drawWindow flags = DRAWWINDOW_DRAW_CARET | DRAWWINDOW_DRAW_VIEW | DRAWWINDOW_USE_WIDGET_LAYERS; window size = 1280,672; test browser size = 800,1000

'screen': ['X:1280 Y:672']

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/2aa5028f2c6c
https://hg.mozilla.org/mozilla-central/rev/6ac2276b465c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in before you can comment on or make changes to this bug.