Commit d562d1fa authored by Marian-Vasile Laza's avatar Marian-Vasile Laza
Browse files

Backed out 2 changesets (bug 1748981) for causing geckoview test failures. CLOSED TREE

Backed out changeset 5e151bd74f2a (bug 1748981)
Backed out changeset 4df658fcf42d (bug 1748981)
parent bc9802e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ RefPtr<mozilla::MozPromise<bool, bool, false>> LockScreenOrientation(
          GetCurrentSerialEventTarget(), __func__,
          [=](const mozilla::MozPromise<bool, ipc::ResponseRejectReason,
                                        true>::ResolveOrRejectValue& aValue) {
            if (aValue.IsResolve() && aValue.ResolveValue()) {
            if (aValue.IsResolve()) {
              return mozilla::MozPromise<bool, bool, false>::CreateAndResolve(
                  true, __func__);
            }
+3 −9
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ class OrientationDelegateTest : BaseSessionTest() {

    private fun lockPortrait() {
        val promise = mainSession.evaluatePromiseJS("screen.orientation.lock('portrait-primary')")
        sessionRule.delegateDuringNextWait(object : OrientationController.OrientationDelegate {
        sessionRule.waitUntilCalled(object : OrientationController.OrientationDelegate {
            @AssertCalled(count = 1)
            override fun onOrientationLock(aOrientation: Int): GeckoResult<AllowOrDeny> {
                assertThat(
@@ -63,13 +63,11 @@ class OrientationDelegateTest : BaseSessionTest() {
        })
        sessionRule.runtime.orientationChanged(Configuration.ORIENTATION_PORTRAIT)
        promise.value
        // Remove previous delegate
        mainSession.waitForRoundTrip()
    }

    private fun lockLandscape() {
        val promise = mainSession.evaluatePromiseJS("screen.orientation.lock('landscape-primary')")
        sessionRule.delegateDuringNextWait(object : OrientationController.OrientationDelegate {
        sessionRule.waitUntilCalled(object : OrientationController.OrientationDelegate {
            @AssertCalled(count = 1)
            override fun onOrientationLock(aOrientation: Int): GeckoResult<AllowOrDeny> {
                assertThat(
@@ -85,8 +83,6 @@ class OrientationDelegateTest : BaseSessionTest() {
        })
        sessionRule.runtime.orientationChanged(Configuration.ORIENTATION_LANDSCAPE)
        promise.value
        // Remove previous delegate
        mainSession.waitForRoundTrip()
    }

    @Test fun orientationLock() {
@@ -148,7 +144,7 @@ class OrientationDelegateTest : BaseSessionTest() {
        goFullscreen()

        val promise = mainSession.evaluatePromiseJS("screen.orientation.lock('landscape-primary')")
        sessionRule.delegateDuringNextWait(object : OrientationController.OrientationDelegate {
        sessionRule.waitUntilCalled(object : OrientationController.OrientationDelegate {
            @AssertCalled(count = 1)
            override fun onOrientationLock(aOrientation: Int): GeckoResult<AllowOrDeny> {
                assertThat(
@@ -164,8 +160,6 @@ class OrientationDelegateTest : BaseSessionTest() {
        })
        sessionRule.runtime.orientationChanged(Configuration.ORIENTATION_LANDSCAPE)
        promise.value
        // Remove previous delegate
        mainSession.waitForRoundTrip()

        // after locking to orientation landscape, unlock to default
        mainSession.evaluateJS("screen.orientation.unlock()")