blob: 40512205a8f81204c96c7146847ec8e774e158d7 [file] [log] [blame]
Lucas Dupin6865b712017-09-11 12:28:03 -07001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.systemui.statusbar.phone;
18
19import static org.mockito.Mockito.mock;
20
21import android.content.Context;
22import android.support.test.filters.SmallTest;
23import android.support.test.runner.AndroidJUnit4;
24import android.test.UiThreadTest;
25import android.view.ContextThemeWrapper;
26import android.view.ViewGroup;
27import android.widget.FrameLayout;
28
29import com.android.internal.widget.LockPatternUtils;
30import com.android.keyguard.ViewMediatorCallback;
31import com.android.systemui.R;
32import com.android.systemui.SysuiTestCase;
33import com.android.systemui.keyguard.DismissCallbackRegistry;
34
35import org.junit.Test;
36import org.junit.runner.RunWith;
37
38@SmallTest
39@RunWith(AndroidJUnit4.class)
40public class KeyguardBouncerTest extends SysuiTestCase {
41
42 @UiThreadTest
43 @Test
44 public void inflateDetached() {
45 final ViewGroup container = new FrameLayout(getContext());
46 final KeyguardBouncer bouncer = new KeyguardBouncer(getContext(),
47 mock(ViewMediatorCallback.class), mock(LockPatternUtils.class), container, mock(
48 DismissCallbackRegistry.class));
49
50 // Detached bouncer should still be able to be inflated
51 bouncer.inflateView();
52 }
53
54}