Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e5e3332 authored by Massimo Carli's avatar Massimo Carli
Browse files

Fix WindowSessionSupplier Tests

The WindowSessionSupplier requires a Lock to get
the reference to WindowSession object which is stored
in a static variable in WindowManagerGlobal.

Extending ShellTestCase allow the test to handle
WindowSession correctly.

Flag: com.android.window.flags.app_compat_refactoring
Fix: 394215936
Test: atest WMShellUnitTests

Change-Id: Ib6e7d7a77d9682d96437af4a3618545e7c2bd6f7
parent 2d033ed0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.wm.shell.common
import android.testing.AndroidTestingRunner
import android.view.IWindowSession
import androidx.test.filters.SmallTest
import com.android.wm.shell.ShellTestCase
import org.junit.Test
import org.junit.runner.RunWith

@@ -30,10 +31,10 @@ import org.junit.runner.RunWith
 */
@RunWith(AndroidTestingRunner::class)
@SmallTest
class WindowSessionSupplierTest {
class WindowSessionSupplierTest : ShellTestCase() {

    @Test
    fun `InputChannelSupplier supplies an InputChannel`() {
    fun `WindowSessionSupplierTest supplies an IWindowSession`() {
        val supplier = WindowSessionSupplier()
        SuppliersUtilsTest.assertSupplierProvidesValue(supplier) {
            it is IWindowSession