Closed Bug 1467915 Opened 6 years ago Closed 6 years ago

Give a surface to background sessions in TestRunnerActivity

Categories

(GeckoView :: General, enhancement, P2)

59 Branch
enhancement

Tracking

(firefox62 wontfix, firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox62 --- wontfix
firefox63 --- fixed

People

(Reporter: snorp, Assigned: snorp)

References

Details

Attachments

(1 file)

Some tests use window.open() and then run things that need the compositor to function properly, e.g. off main thread animations. We need to give background sessions a Surface for this to work.
Comment on attachment 8984604 [details]
Bug 1467915 - Connect a display to background windows in TestRunnerActivity

https://reviewboard.mozilla.org/r/250476/#review256934

::: mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/TestRunnerActivity.java:121
(Diff revision 1)
> +        session.acquireDisplay().surfaceChanged(surface, mView.getWidth(), mView.getHeight());
> +        return session;
> +    }
> +
> +    private void closeSession(GeckoSession session) {
> +        session.acquireDisplay().surfaceDestroyed();

Should be calling `releaseDisplay` instead of `acquireDisplay`.

::: mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/TestRunnerActivity.java:121
(Diff revision 1)
> +        session.acquireDisplay().surfaceChanged(surface, mView.getWidth(), mView.getHeight());
> +        return session;
> +    }
> +
> +    private void closeSession(GeckoSession session) {
> +        session.acquireDisplay().surfaceDestroyed();

Should be calling `releaseDisplay` instead of `acquireDisplay`.
Attachment #8984604 - Flags: review?(nchen) → review-
Comment on attachment 8984604 [details]
Bug 1467915 - Connect a display to background windows in TestRunnerActivity

https://reviewboard.mozilla.org/r/250476/#review260416

::: mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/TestRunnerActivity.java:115
(Diff revision 2)
>          final GeckoSession session = new GeckoSession(settings);
>          session.setNavigationDelegate(mNavigationDelegate);
>          return session;
>      }
>  
> +    private GeckoSession createBackgroundSession(GeckoSessionSettings settings) {

final.
Attachment #8984604 - Flags: review?(esawin) → review+
Pushed by jwillcox@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3820ad4c882b
Connect a display to background windows in TestRunnerActivity r=esawin
https://hg.mozilla.org/mozilla-central/rev/3820ad4c882b
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Assignee: nobody → snorp
Product: Firefox for Android → GeckoView
Version: Firefox 59 → 59 Branch
Target Milestone: Firefox 63 → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: