Loading services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java +14 −6 Original line number Diff line number Diff line Loading @@ -16,17 +16,23 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; /** * Tests for the {@link WindowState} class. Loading @@ -36,15 +42,16 @@ import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; * Run: adb shell am instrument -w -e class com.android.server.wm.AppWindowTokenTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class AppWindowTokenTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class AppWindowTokenTests { private static WindowManagerService sWm = null; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. Loading @@ -52,6 +59,7 @@ public class AppWindowTokenTests extends AndroidTestCase { } } @Test public void testFindMainWindow() throws Exception { final TestAppWindowToken token = new TestAppWindowToken(); Loading services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java +22 −4 Original line number Diff line number Diff line Loading @@ -16,12 +16,21 @@ package com.android.server.wm; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import org.junit.Test; import org.junit.runner.RunWith; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.Comparator; import java.util.LinkedList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Test class for {@link WindowContainer}. * Loading @@ -30,14 +39,17 @@ import java.util.LinkedList; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowContainerTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowContainerTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowContainerTests { @Test public void testCreation() throws Exception { final TestWindowContainer w = new TestWindowContainerBuilder().setLayer(0).build(); assertNull("window must have no parent", w.getParentWindow()); assertEquals("window must have no children", 0, w.getChildrenCount()); } @Test public void testAdd() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -69,6 +81,7 @@ public class WindowContainerTests extends AndroidTestCase { assertEquals(layer2, root.getChildAt(6)); } @Test public void testHasChild() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -98,6 +111,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child2.hasChild(child12)); } @Test public void testRemoveImmediately() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -132,6 +146,7 @@ public class WindowContainerTests extends AndroidTestCase { assertEquals(0, root.getChildrenCount()); } @Test public void testDetachFromDisplay() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -150,6 +165,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.detachFromDisplay()); } @Test public void testIsAnimating() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -168,6 +184,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.isAnimating()); } @Test public void testIsVisible() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -186,6 +203,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.isVisible()); } @Test public void testDetachChild() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java +22 −7 Original line number Diff line number Diff line Loading @@ -16,9 +16,14 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; Loading @@ -27,6 +32,10 @@ import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Tests for the {@link WindowState} class. Loading @@ -36,25 +45,26 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowStateTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowStateTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowStateTests { private static WindowManagerService sWm = null; private WindowToken mWindowToken; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); // final InputManagerService im = new InputManagerService(context); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. sWm = WindowManagerService.main(context, /*im*/ null, true, false, false, mPolicy); sWm = WindowManagerService.main(context, null, true, false, false, mPolicy); } mWindowToken = new WindowToken(sWm, null, 0, false); } @Test public void testIsParentWindowHidden() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -71,6 +81,7 @@ public class WindowStateTests extends AndroidTestCase { assertTrue(child2.isParentWindowHidden()); } @Test public void testIsChildWindow() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -83,6 +94,7 @@ public class WindowStateTests extends AndroidTestCase { assertFalse(randomWindow.isChildWindow()); } @Test public void testHasChild() throws Exception { final WindowState win1 = createWindow(null, TYPE_APPLICATION); final WindowState win11 = createWindow(win1, FIRST_SUB_WINDOW); Loading @@ -103,6 +115,7 @@ public class WindowStateTests extends AndroidTestCase { assertFalse(win2.hasChild(randomWindow)); } @Test public void testGetBottomChild() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); assertNull(parentWindow.getBottomChild()); Loading @@ -126,6 +139,7 @@ public class WindowStateTests extends AndroidTestCase { assertEquals(child4, parentWindow.getBottomChild()); } @Test public void testGetParentWindow() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -136,6 +150,7 @@ public class WindowStateTests extends AndroidTestCase { assertEquals(parentWindow, child2.getParentWindow()); } @Test public void testGetTopParentWindow() throws Exception { final WindowState root = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(root, FIRST_SUB_WINDOW); Loading services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java +19 −8 Original line number Diff line number Diff line Loading @@ -16,18 +16,24 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.os.IBinder; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Tests for the {@link WindowState} class. Loading @@ -37,15 +43,16 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowTokenTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowTokenTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowTokenTests { private static WindowManagerService sWm = null; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. Loading @@ -53,6 +60,7 @@ public class WindowTokenTests extends AndroidTestCase { } } @Test public void testAddWindow() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading Loading @@ -81,6 +89,7 @@ public class WindowTokenTests extends AndroidTestCase { assertTrue(token.hasWindow(window3)); } @Test public void testAdjustAnimLayer() throws Exception { final TestWindowToken token = new TestWindowToken(); final WindowState window1 = createWindow(null, TYPE_APPLICATION, token); Loading @@ -106,6 +115,7 @@ public class WindowTokenTests extends AndroidTestCase { assertEquals(window3StartLayer + adj, highestLayer); } @Test public void testGetTopWindow() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading @@ -125,6 +135,7 @@ public class WindowTokenTests extends AndroidTestCase { assertEquals(window12, token.getTopWindow()); } @Test public void testGetWindowIndex() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading Loading
services/tests/servicestests/src/com/android/server/wm/AppWindowTokenTests.java +14 −6 Original line number Diff line number Diff line Loading @@ -16,17 +16,23 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; /** * Tests for the {@link WindowState} class. Loading @@ -36,15 +42,16 @@ import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; * Run: adb shell am instrument -w -e class com.android.server.wm.AppWindowTokenTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class AppWindowTokenTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class AppWindowTokenTests { private static WindowManagerService sWm = null; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. Loading @@ -52,6 +59,7 @@ public class AppWindowTokenTests extends AndroidTestCase { } } @Test public void testFindMainWindow() throws Exception { final TestAppWindowToken token = new TestAppWindowToken(); Loading
services/tests/servicestests/src/com/android/server/wm/WindowContainerTests.java +22 −4 Original line number Diff line number Diff line Loading @@ -16,12 +16,21 @@ package com.android.server.wm; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import org.junit.Test; import org.junit.runner.RunWith; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import java.util.Comparator; import java.util.LinkedList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Test class for {@link WindowContainer}. * Loading @@ -30,14 +39,17 @@ import java.util.LinkedList; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowContainerTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowContainerTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowContainerTests { @Test public void testCreation() throws Exception { final TestWindowContainer w = new TestWindowContainerBuilder().setLayer(0).build(); assertNull("window must have no parent", w.getParentWindow()); assertEquals("window must have no children", 0, w.getChildrenCount()); } @Test public void testAdd() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -69,6 +81,7 @@ public class WindowContainerTests extends AndroidTestCase { assertEquals(layer2, root.getChildAt(6)); } @Test public void testHasChild() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -98,6 +111,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child2.hasChild(child12)); } @Test public void testRemoveImmediately() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading Loading @@ -132,6 +146,7 @@ public class WindowContainerTests extends AndroidTestCase { assertEquals(0, root.getChildrenCount()); } @Test public void testDetachFromDisplay() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -150,6 +165,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.detachFromDisplay()); } @Test public void testIsAnimating() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -168,6 +184,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.isAnimating()); } @Test public void testIsVisible() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading @@ -186,6 +203,7 @@ public class WindowContainerTests extends AndroidTestCase { assertFalse(child21.isVisible()); } @Test public void testDetachChild() throws Exception { final TestWindowContainerBuilder builder = new TestWindowContainerBuilder(); final TestWindowContainer root = builder.setLayer(0).build(); Loading
services/tests/servicestests/src/com/android/server/wm/WindowStateTests.java +22 −7 Original line number Diff line number Diff line Loading @@ -16,9 +16,14 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; Loading @@ -27,6 +32,10 @@ import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Tests for the {@link WindowState} class. Loading @@ -36,25 +45,26 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowStateTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowStateTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowStateTests { private static WindowManagerService sWm = null; private WindowToken mWindowToken; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); // final InputManagerService im = new InputManagerService(context); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. sWm = WindowManagerService.main(context, /*im*/ null, true, false, false, mPolicy); sWm = WindowManagerService.main(context, null, true, false, false, mPolicy); } mWindowToken = new WindowToken(sWm, null, 0, false); } @Test public void testIsParentWindowHidden() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -71,6 +81,7 @@ public class WindowStateTests extends AndroidTestCase { assertTrue(child2.isParentWindowHidden()); } @Test public void testIsChildWindow() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -83,6 +94,7 @@ public class WindowStateTests extends AndroidTestCase { assertFalse(randomWindow.isChildWindow()); } @Test public void testHasChild() throws Exception { final WindowState win1 = createWindow(null, TYPE_APPLICATION); final WindowState win11 = createWindow(win1, FIRST_SUB_WINDOW); Loading @@ -103,6 +115,7 @@ public class WindowStateTests extends AndroidTestCase { assertFalse(win2.hasChild(randomWindow)); } @Test public void testGetBottomChild() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); assertNull(parentWindow.getBottomChild()); Loading @@ -126,6 +139,7 @@ public class WindowStateTests extends AndroidTestCase { assertEquals(child4, parentWindow.getBottomChild()); } @Test public void testGetParentWindow() throws Exception { final WindowState parentWindow = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(parentWindow, FIRST_SUB_WINDOW); Loading @@ -136,6 +150,7 @@ public class WindowStateTests extends AndroidTestCase { assertEquals(parentWindow, child2.getParentWindow()); } @Test public void testGetTopParentWindow() throws Exception { final WindowState root = createWindow(null, TYPE_APPLICATION); final WindowState child1 = createWindow(root, FIRST_SUB_WINDOW); Loading
services/tests/servicestests/src/com/android/server/wm/WindowTokenTests.java +19 −8 Original line number Diff line number Diff line Loading @@ -16,18 +16,24 @@ package com.android.server.wm; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import android.content.Context; import android.os.IBinder; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import android.view.IWindow; import android.view.WindowManager; import android.view.WindowManagerPolicy; import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_MEDIA_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; /** * Tests for the {@link WindowState} class. Loading @@ -37,15 +43,16 @@ import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_PANEL; * Run: adb shell am instrument -w -e class com.android.server.wm.WindowTokenTests com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner */ @SmallTest public class WindowTokenTests extends AndroidTestCase { @RunWith(AndroidJUnit4.class) public class WindowTokenTests { private static WindowManagerService sWm = null; private final WindowManagerPolicy mPolicy = new TestWindowManagerPolicy(); private final IWindow mIWindow = new TestIWindow(); @Override @Before public void setUp() throws Exception { final Context context = getContext(); final Context context = InstrumentationRegistry.getTargetContext(); if (sWm == null) { // We only want to do this once for the test process as we don't want WM to try to // register a bunch of local services again. Loading @@ -53,6 +60,7 @@ public class WindowTokenTests extends AndroidTestCase { } } @Test public void testAddWindow() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading Loading @@ -81,6 +89,7 @@ public class WindowTokenTests extends AndroidTestCase { assertTrue(token.hasWindow(window3)); } @Test public void testAdjustAnimLayer() throws Exception { final TestWindowToken token = new TestWindowToken(); final WindowState window1 = createWindow(null, TYPE_APPLICATION, token); Loading @@ -106,6 +115,7 @@ public class WindowTokenTests extends AndroidTestCase { assertEquals(window3StartLayer + adj, highestLayer); } @Test public void testGetTopWindow() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading @@ -125,6 +135,7 @@ public class WindowTokenTests extends AndroidTestCase { assertEquals(window12, token.getTopWindow()); } @Test public void testGetWindowIndex() throws Exception { final TestWindowToken token = new TestWindowToken(); Loading