Lines Matching refs:token

49         final WindowTestUtils.TestWindowToken token =
52 assertEquals(0, token.getWindowsCount());
54 final WindowState window1 = createWindow(null, TYPE_APPLICATION, token, "window1");
55 final WindowState window11 = createWindow(window1, FIRST_SUB_WINDOW, token, "window11");
56 final WindowState window12 = createWindow(window1, FIRST_SUB_WINDOW, token, "window12");
57 final WindowState window2 = createWindow(null, TYPE_APPLICATION, token, "window2");
58 final WindowState window3 = createWindow(null, TYPE_APPLICATION, token, "window3");
60 token.addWindow(window1);
61 // NOTE: Child windows will not be added to the token as window containers can only
63 token.addWindow(window11);
64 token.addWindow(window12);
65 token.addWindow(window2);
66 token.addWindow(window3);
69 assertEquals(3, token.getWindowsCount());
70 assertTrue(token.hasWindow(window1));
71 assertFalse(token.hasWindow(window11));
72 assertFalse(token.hasWindow(window12));
73 assertTrue(token.hasWindow(window2));
74 assertTrue(token.hasWindow(window3));
80 final WindowTestUtils.TestWindowToken token = new WindowTestUtils.TestWindowToken(0, dc);
82 assertEquals(token, dc.getWindowToken(token.token));
84 final WindowState window1 = createWindow(null, TYPE_APPLICATION, token, "window1");
85 final WindowState window2 = createWindow(null, TYPE_APPLICATION, token, "window2");
88 // The token should still be mapped in the display content since it still has a child.
89 assertEquals(token, dc.getWindowToken(token.token));
92 // The token should have been removed from the display content since it no longer has a
94 assertEquals(null, dc.getWindowToken(token.token));
99 final WindowTestUtils.TestWindowToken token =
101 final WindowState window1 = createWindow(null, TYPE_APPLICATION, token, "window1");
102 final WindowState window11 = createWindow(window1, FIRST_SUB_WINDOW, token, "window11");
103 final WindowState window12 = createWindow(window1, FIRST_SUB_WINDOW, token, "window12");
104 final WindowState window2 = createWindow(null, TYPE_APPLICATION, token, "window2");
105 final WindowState window3 = createWindow(null, TYPE_APPLICATION, token, "window3");
122 int adj = token.adj = 50;
124 final int highestLayer = token.getHighestAnimLayer();
135 * Test that a window token isn't orphaned by the system when it is requested to be removed.
140 final WindowTestUtils.TestWindowToken token =
144 // Verify that the token is on the display
145 assertNotNull(mDisplayContent.getWindowToken(token.token));
147 final WindowState window1 = createWindow(null, TYPE_TOAST, token, "window1");
148 final WindowState window2 = createWindow(null, TYPE_TOAST, token, "window2");
150 mDisplayContent.removeWindowToken(token.token);
151 // Verify that the token is no longer mapped on the display
152 assertNull(mDisplayContent.getWindowToken(token.token));
153 // Verify that the token is still attached to its parent
154 assertNotNull(token.getParent());
155 // Verify that the token windows are still around.
156 assertEquals(2, token.getWindowsCount());
159 // Verify that the token is still attached to its parent
160 assertNotNull(token.getParent());
161 // Verify that the other token window is still around.
162 assertEquals(1, token.getWindowsCount());
165 // Verify that the token is no-longer attached to its parent
166 assertNull(token.getParent());
167 // Verify that the token windows are no longer attached to it.
168 assertEquals(0, token.getWindowsCount());