Closed Bug 1507852 Opened 2 years ago Closed 1 year ago

Add GeckoView API to toggle desktop viewport support

Categories

(GeckoView :: General, enhancement, P2)

enhancement

Tracking

(geckoview64 wontfix, geckoview65 wontfix, geckoview66 fixed, firefox64 wontfix, firefox65 wontfix, firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
geckoview64 --- wontfix
geckoview65 --- wontfix
geckoview66 --- fixed
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- fixed

People

(Reporter: rbarker, Assigned: rbarker)

References

Details

Attachments

(1 file)

GeckoView has an API for changing the user agent string, but the desktop viewport support is only enabled when the desktop UA is set. It should be possible to set the viewport mode regardless of the current UA string.
Product: Firefox for Android → GeckoView
Thanks Randall!
Assignee: nobody → rbarker
Priority: P3 → P2
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/129a3f527c8e
Add GeckoView API to toggle desktop viewport support r=geckoview-reviewers,snorp,agi

Backed out changeset 129a3f527c8e (Bug 1507852) for NavigationDelegateTest.desktopMode failures.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=android%2C4.3%2Capi16%2B%2Cdebug%2Ctest-android-em-4.3-arm7-api-16%2Fdebug-geckoview-junit-e10s-2%2C%28gv-junit2%29&selectedJob=220416996&revision=129a3f527c8ee2091598f5035eabe6d8da1f45dc

Backout link: https://hg.mozilla.org/integration/autoland/rev/c8d48fc7201d7fea60354fa81c4dce0fc5d85597

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=220416996&repo=autoland&lineNumber=1951

[task 2019-01-07T21:31:25.259Z] 21:31:25 INFO - TEST-START | org.mozilla.geckoview.test.NavigationDelegateTest.desktopMode
[task 2019-01-07T21:33:53.988Z] 21:33:53 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
[task 2019-01-07T21:33:53.989Z] 21:33:53 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: current=34
[task 2019-01-07T21:33:53.989Z] 21:33:53 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: class=org.mozilla.geckoview.test.NavigationDelegateTest
[task 2019-01-07T21:33:54.089Z] 21:33:54 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: stream=
[task 2019-01-07T21:33:54.090Z] 21:33:54 INFO - org.mozilla.geckoview.test | Error in desktopMode(org.mozilla.geckoview.test.NavigationDelegateTest):
[task 2019-01-07T21:33:54.092Z] 21:33:54 INFO - org.mozilla.geckoview.test | org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 120000ms
[task 2019-01-07T21:33:54.092Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutRunnable.run(UiThreadUtils.java:56)
[task 2019-01-07T21:33:54.092Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.handleCallback(Handler.java:730)
[task 2019-01-07T21:33:54.092Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.dispatchMessage(Handler.java:92)
[task 2019-01-07T21:33:54.093Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils.loopUntilIdle(UiThreadUtils.java:154)
[task 2019-01-07T21:33:54.094Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils.waitForResult(UiThreadUtils.java:95)
[task 2019-01-07T21:33:54.094Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.rule.GeckoSessionTestRule.waitForResult(GeckoSessionTestRule.java:2230)
[task 2019-01-07T21:33:54.095Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.NavigationDelegateTest.desktopMode(NavigationDelegateTest.kt:374)
[task 2019-01-07T21:33:54.096Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invokeNative(Native Method)
[task 2019-01-07T21:33:54.096Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invoke(Method.java:525)
[task 2019-01-07T21:33:54.097Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[task 2019-01-07T21:33:54.098Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[task 2019-01-07T21:33:54.099Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[task 2019-01-07T21:33:54.100Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[task 2019-01-07T21:33:54.101Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.rule.GeckoSessionTestRule$3$1.run(GeckoSessionTestRule.java:1384)
[task 2019-01-07T21:33:54.102Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1719)
[task 2019-01-07T21:33:54.102Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.handleCallback(Handler.java:730)
[task 2019-01-07T21:33:54.103Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.dispatchMessage(Handler.java:92)
[task 2019-01-07T21:33:54.103Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Looper.loop(Looper.java:137)
[task 2019-01-07T21:33:54.104Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.app.ActivityThread.main(ActivityThread.java:5103)
[task 2019-01-07T21:33:54.104Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invokeNative(Native Method)
[task 2019-01-07T21:33:54.105Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invoke(Method.java:525)
[task 2019-01-07T21:33:54.106Z] 21:33:54 INFO - org.mozilla.geckoview.test | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
[task 2019-01-07T21:33:54.106Z] 21:33:54 INFO - org.mozilla.geckoview.test | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[task 2019-01-07T21:33:54.107Z] 21:33:54 INFO - org.mozilla.geckoview.test | at dalvik.system.NativeStart.main(Native Method)
[task 2019-01-07T21:33:54.107Z] 21:33:54 INFO - org.mozilla.geckoview.test |
[task 2019-01-07T21:33:54.108Z] 21:33:54 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: numtests=62
[task 2019-01-07T21:33:54.108Z] 21:33:54 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: stack=org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutException: Timed out after 120000ms
[task 2019-01-07T21:33:54.109Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils$TimeoutRunnable.run(UiThreadUtils.java:56)
[task 2019-01-07T21:33:54.109Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.handleCallback(Handler.java:730)
[task 2019-01-07T21:33:54.110Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.dispatchMessage(Handler.java:92)
[task 2019-01-07T21:33:54.111Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils.loopUntilIdle(UiThreadUtils.java:154)
[task 2019-01-07T21:33:54.112Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.util.UiThreadUtils.waitForResult(UiThreadUtils.java:95)
[task 2019-01-07T21:33:54.112Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.rule.GeckoSessionTestRule.waitForResult(GeckoSessionTestRule.java:2230)
[task 2019-01-07T21:33:54.113Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.NavigationDelegateTest.desktopMode(NavigationDelegateTest.kt:374)
[task 2019-01-07T21:33:54.114Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invokeNative(Native Method)
[task 2019-01-07T21:33:54.114Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invoke(Method.java:525)
[task 2019-01-07T21:33:54.115Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[task 2019-01-07T21:33:54.116Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[task 2019-01-07T21:33:54.117Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[task 2019-01-07T21:33:54.117Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[task 2019-01-07T21:33:54.118Z] 21:33:54 INFO - org.mozilla.geckoview.test | at org.mozilla.geckoview.test.rule.GeckoSessionTestRule$3$1.run(GeckoSessionTestRule.java:1384)
[task 2019-01-07T21:33:54.119Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1719)
[task 2019-01-07T21:33:54.119Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.handleCallback(Handler.java:730)
[task 2019-01-07T21:33:54.120Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Handler.dispatchMessage(Handler.java:92)
[task 2019-01-07T21:33:54.120Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.os.Looper.loop(Looper.java:137)
[task 2019-01-07T21:33:54.121Z] 21:33:54 INFO - org.mozilla.geckoview.test | at android.app.ActivityThread.main(ActivityThread.java:5103)
[task 2019-01-07T21:33:54.121Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invokeNative(Native Method)
[task 2019-01-07T21:33:54.122Z] 21:33:54 INFO - org.mozilla.geckoview.test | at java.lang.reflect.Method.invoke(Method.java:525)
[task 2019-01-07T21:33:54.122Z] 21:33:54 INFO - org.mozilla.geckoview.test | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
[task 2019-01-07T21:33:54.123Z] 21:33:54 INFO - org.mozilla.geckoview.test | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[task 2019-01-07T21:33:54.123Z] 21:33:54 INFO - org.mozilla.geckoview.test | at dalvik.system.NativeStart.main(Native Method)
[task 2019-01-07T21:33:54.124Z] 21:33:54 INFO - org.mozilla.geckoview.test |
[task 2019-01-07T21:33:54.124Z] 21:33:54 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS: test=desktopMode
[task 2019-01-07T21:33:54.125Z] 21:33:54 INFO - org.mozilla.geckoview.test | INSTRUMENTATION_STATUS_CODE: -2
[task 2019-01-07T21:33:54.125Z] 21:33:54 WARNING - TEST-UNEXPECTED-FAIL | org.mozilla.geckoview.test.NavigationDelegateTest.desktopMode | status -2
[task 2019-01-07T21:33:54.126Z] 21:33:54 INFO - TEST-INFO took 148850ms

Flags: needinfo?(rbarker)
Pushed by rbarker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/953e31ae0e5d
Add GeckoView API to toggle desktop viewport support r=geckoview-reviewers,snorp,agi
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
https://hg.mozilla.org/projects/cedar/rev/953e31ae0e5d51f97dcd7070bea05c0ffd7f1c2c
Bug 1507852 - Add GeckoView API to toggle desktop viewport support r=geckoview-reviewers,snorp,agi

65=wontfix because I assume we don't need to uplift this new desktop viewport API to GV 65 for Focus 9.0.

Depends on: 1521600
You need to log in before you can comment on or make changes to this bug.