1 /* 2 * Copyright (C) 2022 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 17 package com.android.cts.verifier; 18 19 import com.android.interactive.annotations.Interactive; 20 import com.android.interactive.annotations.SupportMultiDisplayMode; 21 import com.android.tradefed.testtype.DeviceJUnit4ClassRunner; 22 23 import org.junit.Test; 24 import org.junit.runner.RunWith; 25 26 @RunWith(DeviceJUnit4ClassRunner.class) 27 public final class ProjectionTest extends CtsVerifierTest { 28 29 @Interactive 30 @Test 31 @SupportMultiDisplayMode 32 // MultiDisplayMode ProjectionCubeTest()33 public void ProjectionCubeTest() throws Exception { 34 requireFeatures("android.hardware.faketouch"); 35 36 runTest(".projection.cube.ProjectionCubeActivity"); 37 } 38 39 @Interactive 40 @Test 41 @SupportMultiDisplayMode 42 // MultiDisplayMode ProjectionWidgetTest()43 public void ProjectionWidgetTest() throws Exception { 44 requireFeatures("android.hardware.faketouch"); 45 46 runTest(".projection.widgets.ProjectionWidgetActivity"); 47 } 48 49 @Interactive 50 @Test 51 @SupportMultiDisplayMode 52 // MultiDisplayMode ProjectionListTest()53 public void ProjectionListTest() throws Exception { 54 excludeFeatures("android.hardware.type.television", "android.software.leanback"); 55 56 runTest(".projection.list.ProjectionListActivity"); 57 } 58 59 @Interactive 60 @Test 61 @SupportMultiDisplayMode 62 // MultiDisplayMode ProjectionVideoTest()63 public void ProjectionVideoTest() throws Exception { 64 excludeFeatures("android.hardware.type.watch"); 65 66 runTest(".projection.video.ProjectionVideoActivity"); 67 } 68 69 @Interactive 70 @Test 71 @SupportMultiDisplayMode 72 // MultiDisplayMode ProjectionTouchTest()73 public void ProjectionTouchTest() throws Exception { 74 requireFeatures("android.hardware.faketouch", "android.hardware.touchscreen.multitouch"); 75 76 runTest(".projection.touch.ProjectionTouchActivity"); 77 } 78 79 @Interactive 80 @Test 81 @SupportMultiDisplayMode 82 // MultiDisplayMode ProjectionOffscreenTest()83 public void ProjectionOffscreenTest() throws Exception { 84 excludeFeatures( 85 "android.hardware.type.television", 86 "android.software.leanback", 87 "android.hardware.type.automotive"); 88 89 runTest(".projection.offscreen.ProjectionOffscreenActivity"); 90 } 91 } 92