Closed
Bug 938021
Opened 11 years ago
Closed 7 years ago
[marionette-orientation] Implement plugin so we can use setOrientation
Categories
(Testing Graveyard :: JSMarionette, defect)
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: jlal, Unassigned)
Details
Attachments
(1 file)
1. use this https://github.com/mozilla-b2g/marionette-content-script so we can hack into all pages.
2. Expose (via plugin) client.setOrientation('landscape') (see .screen) which will update .screen properties and screen.mozOrientation.
3. fire resize event
See if webdriver has some specific rules to how this is implemented so hack can go away once we land proper platform support. The goal here is to provide something quickly to unblock some system app testing for alive.
Comment 1•11 years ago
|
||
We have bug 804515; how do these two relate?
Comment 2•11 years ago
|
||
Hi Stephen,
It looks like that bug 804515 blocks bug 938021.
We also would like the marionette-orientation module could rotate the screen of b2g, not just change the value of .screen properties and screen.mozOrientation.
How do you guys think?
Depends on: 804515
Reporter | ||
Comment 3•11 years ago
|
||
@Stephen
This is a hack... jgriffin and I spoke today and we can get a real fix soonish (> 1 week) this is to address alive's needs now.
@Evan I will see what I can do.
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → jlal
Comment 4•11 years ago
|
||
Cool! Cannot wait to see.
Reporter | ||
Comment 5•11 years ago
|
||
There is a bunch of code to handle this in the simulator: https://github.com/mozilla/r2d2b2g/blob/65b9a605c8f98f18c9114e933a5e10dce07085a4/prosthesis/modules/GlobalSimulatorScreen.jsm
I personally don't have time to get all these details working for this hack (the initial version will only work in one app at a time and won't do much magic)
I am not sure what the best long term solution is... Ideally 804515 is fixed in some sane way and this plugin can go away.
Reporter | ||
Comment 6•11 years ago
|
||
Attachment #832106 -
Flags: review?(evanxd)
Attachment #832106 -
Flags: review?(alive)
Comment 7•11 years ago
|
||
Comment on attachment 832106 [details] [review]
https://github.com/mozilla-b2g/marionette-orientation/pull/1
Need to change allowed orientation, I have no comments on other stuff.
Attachment #832106 -
Flags: review?(alive)
Comment 8•11 years ago
|
||
Hi James,
I have comments for screen state things.
Thanks.
Reporter | ||
Comment 9•11 years ago
|
||
@Alive sorry can you clarify allowed orientation? What hacks do you need?
There is some much better hacks here: https://github.com/mozilla/r2d2b2g/blob/master/prosthesis/modules/GlobalSimulatorScreen.jsm but I would like to fix the problem in marionette.
@Evan
I don't have too much time to implement every feature the current version _will_ change the values of innerWidth and innerHeight so it should be suitable for cases where we use those values to detect orientation. My hope is we can iterate on this until we have something more concrete in the platform (marionette) which works across all devices well.
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(evanxd)
Flags: needinfo?(alive)
Comment 10•11 years ago
|
||
Comment on attachment 832106 [details] [review]
https://github.com/mozilla-b2g/marionette-orientation/pull/1
Hi James,
Sorry, got it.
The patch is good for me.
Attachment #832106 -
Flags: review?(evanxd) → review+
Updated•11 years ago
|
Flags: needinfo?(evanxd)
Comment 11•11 years ago
|
||
We could follow up the complete orientation mode things in Bug 940871.
Comment 12•11 years ago
|
||
(In reply to James Lal [:lightsofapollo] from comment #9)
> @Alive sorry can you clarify allowed orientation? What hacks do you need?
>
> There is some much better hacks here:
> https://github.com/mozilla/r2d2b2g/blob/master/prosthesis/modules/
> GlobalSimulatorScreen.jsm but I would like to fix the problem in marionette.
>
> @Evan
>
> I don't have too much time to implement every feature the current version
> _will_ change the values of innerWidth and innerHeight so it should be
> suitable for cases where we use those values to detect orientation. My hope
> is we can iterate on this until we have something more concrete in the
> platform (marionette) which works across all devices well.
For screen.mozOrientation:
portrait-primary, portrait-secondary, landscape-primary, landscape-secondary.
For screen.mozLockOrientation:
default, portrait-primary, portrait-secondary, landscape-primary, landscape-secondary.
After doing screen.mozLockOrientation('default'), screen.mozOrientation should tell me the correct default orientation but it's only portrait-primary or landscape-primary.
Flags: needinfo?(alive)
Reporter | ||
Comment 13•11 years ago
|
||
Ran out of time to do this better- If we need entire mocking we should integrate https://github.com/mozilla/r2d2b2g/blob/master/prosthesis/modules/GlobalSimulatorScreen.jsm into the testing environment (or better b2g as a whole)
Assignee: jlal → nobody
Comment 14•7 years ago
|
||
Bulk closed as part of https://bugzilla.mozilla.org/show_bug.cgi?id=1422750
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Updated•7 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•